/

CVE-2026-77775

Severity:

HIGH RISK

(8.6)

Server-Side Request Forgery (CWE-918) in Headroom Proxy

CVE-2026-77775

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal service and cloud metadata access with potential credential disclosure

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Headroom's LLM proxy allows clients to select an upstream destination through the x-headroom-base-url request header without blocking internal or metadata-network addresses. When the proxy is reachable without authentication, an attacker may use it to access internal services, disclose their responses, and forward accompanying authorization credentials to a chosen host.

Affected context

The vulnerability occurs in Headroom deployments where proxy or passthrough routes honor the x-headroom-base-url header and the service is reachable by an attacker. Risk is increased when the server listens on a network-accessible interface, published container ports expose the data plane, and no proxy authentication token is required. The issue is less likely to be externally reachable when the proxy is bound only to localhost and protected by network and authentication controls.

Exploit preconditions

  • Attack surface: Headroom HTTP proxy and passthrough routes that process x-headroom-base-url
  • Required access: Network access to an exposed Headroom instance; authentication may not be required when the deployment leaves proxy token protection disabled
  • Trigger point: Upstream URL resolution before the proxy forwards the request
  • Why exploitation is possible: The header is accepted after basic URL parsing without destination controls that reject loopback, link-local, private, or cloud metadata addresses, and the upstream response is returned to the client
  • Additional exposure: Authorization data accompanying a proxied request may be forwarded unchanged to the client-selected destination

Why this happens

The underlying bug is insufficient validation of a client-controlled upstream URL. The proxy verifies that the value has an HTTP or HTTPS scheme and a hostname, but does not enforce a network destination policy or restrict requests to an approved upstream set. This maps to CWE-918: Server-Side Request Forgery, because attacker-influenced routing causes the server to make requests to unintended internal or restricted resources and disclose the resulting responses.

Potential impact

  • An attacker may access internal administrative or service endpoints
  • Cloud instance metadata and temporary credentials could be disclosed
  • Internal service responses may be returned to an unauthorized caller
  • Forwarded authorization headers could expose credentials to an attacker-controlled destination
  • The vulnerable proxy could be used to map reachable network services
  • Downstream systems could be affected if the proxy can reach state-changing endpoints

General mitigation guidance

Mitigation generally focuses on removing client control over upstream destinations and enforcing defense-in-depth at the network boundary.

Common defensive patterns include:

  • Restricting upstream selection to a fixed, authenticated allowlist of trusted origins
  • Rejecting loopback, link-local, private, multicast, and cloud metadata destinations after DNS resolution
  • Revalidating destinations across redirects and preventing DNS rebinding
  • Avoiding forwarding client authorization headers to arbitrary upstreams
  • Requiring authentication and authorization for all data-plane proxy routes
  • Binding administrative or development services to private interfaces unless public exposure is intentional
  • Applying egress firewall policies that limit workloads to necessary upstream networks
  • Using least-privilege service identities and minimizing metadata-service access

How teams detect issues like this

Detection can combine application, code, deployment, and network controls:

  • Use static analysis to identify request headers or query parameters that directly influence outbound URLs
  • Review code for URL validation that checks syntax but lacks IP-range, DNS, redirect, or allowlist enforcement
  • Monitor requests containing upstream-selection headers and alert on private, loopback, link-local, or metadata address targets
  • Inspect proxy logs for unusual destination changes, internal hostnames, metadata paths, and unexpected authorization forwarding
  • Enforce deployment policies requiring authentication, restricted bind addresses, and controlled egress
  • Add automated security checks to CI and code review workflows for SSRF-sensitive outbound request patterns

Sources

SourceLink
github.comgithub.com/headroomlabs-ai/headroom
github.comgithub.com/headroomlabs-ai/headroom/blob/v0.29.0/headroom/proxy/handlers/openai.py
github.comgithub.com/headroomlabs-ai/headroom/blob/v0.36.1/headroom/proxy/upstream_guard.py
github.comgithub.com/headroomlabs-ai/headroom/pull/2207
vulncheck.comvulncheck.com/advisories/headroom-proxy-sends-upstream-requests-to-a-client-supplied-base-url-without-address-validation

Frequently asked

questions

Yes, when the Headroom data-plane routes are network-accessible and the attacker can submit requests. A deployment bound only to localhost or isolated behind a properly configured gateway has a smaller exposure scope.

Not necessarily. Deployments that omit the required proxy token or otherwise expose unauthenticated routes may allow network clients to reach the affected functionality without credentials.

Do not allow clients to select arbitrary upstream URLs. Use a strict allowlist of trusted destinations, block restricted address ranges after resolution, prevent unsafe redirects, and avoid forwarding authorization headers across trust boundaries.

Treat all client-controlled routing data as untrusted, enforce outbound network policy, protect metadata services, require authentication for proxy routes, and continuously monitor outbound destinations and unusual proxy behavior.

Find out what's already
exploitable in your codebase.