Summary
CVE-2026-77775 is a Server-Side Request Forgery (SSRF) vulnerability in the Headroom LLM proxy (headroom-ai). The proxy trusts a client-supplied x-headroom-base-url request header to determine the upstream destination for OpenAI-compatible and passthrough API calls, without restricting that destination to safe, external hosts. This allows an unauthenticated network attacker to force the proxy to issue requests to internal services, loopback addresses, and cloud metadata endpoints, and to have the responses — along with forwarded Authorization headers — relayed back to them. The issue is rated HIGH severity (CVSS 3.1 base score 8.6).
Technical details
- Root cause: The functions
_resolve_openai_upstream_baseand_select_passthrough_base_url(inheadroom/proxy/handlers/openai.pyandheadroom/providers/proxy_routes.py) accept an attacker-controlled upstream base URL from thex-headroom-base-urlheader. - Validation gap: The code only checks that the supplied URL has a valid HTTP/HTTPS scheme and a hostname — it does not reject loopback (127.0.0.1), link-local (169.254.0.0/16), or RFC 1918 private address ranges as upstream targets.
- Credential leakage: The Authorization header supplied by the legitimate client is forwarded unchanged to the attacker-designated host, allowing token/credential theft by redirecting requests to an attacker-controlled or internal endpoint.
- Attack vector: Network-based, no privileges or user interaction required — an attacker simply sends a crafted request with a malicious
x-headroom-base-urlheader to a reachable Headroom proxy instance. - Impact: Disclosure of internal service responses, cloud instance metadata (e.g., IMDS credentials), and forwarded authorization tokens; the vulnerability is amplified in deployments using Headroom’s reference Docker Compose configuration, which by default binds the proxy to 0.0.0.0 with published ports and no required authentication token.
Affected software
- Headroom (headroom-ai, PyPI package) versions >= 0, < 0.36.1
Severity
- CVSS 3.1 Base Score: 8.6 (High)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Mitigation and recommended actions
- Immediate: Upgrade Headroom to version 0.36.1 or later, which introduces an
is_safe_upstream_urlguard (upstream_guard.py) to block requests to loopback, link-local, and private address ranges. - If unable to patch immediately:
- Do not expose the Headroom proxy directly to untrusted networks; bind it to localhost or an internal interface rather than 0.0.0.0.
- Enforce authentication tokens on all proxy routes rather than relying on default reference deployment configurations.
- Use network-level egress controls (firewall rules) to block the proxy host from reaching internal RFC 1918 ranges, link-local addresses, and cloud metadata endpoints (e.g., 169.254.169.254).
- Strip or ignore client-supplied Authorization headers when relaying to arbitrary upstream hosts, and audit logs for anomalous
x-headroom-base-urlvalues.

