/

CVE-2026-77776

Severity:

CRITICAL RISK

(9.1)

Authorization Bypass (CWE-639) in Headroom LLM Proxy

CVE-2026-77776

Deferred

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-639

Impact:

Unauthorized access to and modification of stored LLM memory

Severity:

CRITICAL RISK

(9.1)

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 trusts the x-headroom-user-id request header when selecting stored memory, without reliably binding that value to the authenticated caller. A client may therefore access or modify another user's LLM memory, especially when the proxy is network-exposed without authentication.

Affected context

The vulnerability occurs in Headroom proxy data-plane routes, including chat completion and websocket handling, when memory ownership is derived directly from a request header. Risk is increased in deployments that expose the proxy beyond loopback, publish its ports, and do not require a proxy token or another authenticated caller identity.

Exploit preconditions

  • Attack surface: Headroom LLM proxy HTTP and websocket data-plane routes
  • Required access: Network reachability to an exposed proxy endpoint; authentication may be absent in affected deployments
  • Trigger point: Processing a request that uses the x-headroom-user-id value to resolve stored memory ownership
  • Why exploitation is possible: The supplied identity is not consistently bound to the requesting principal, allowing a caller-controlled identifier to select another user's memory

Why this happens

The proxy uses an attacker-controlled request attribute as an authorization identity without establishing that the value belongs to the caller. This is an object-level authorization failure mapped to CWE-639: Authorization Bypass Through User-Controlled Key, because a user-controlled key determines which protected memory record is read or modified. The insecure pattern is trusting a claimed resource owner instead of deriving identity from a verified token, local principal, or otherwise constrained trust boundary.

Potential impact

  • Attackers may read another user's stored LLM memory
  • Attackers may modify, corrupt, or poison another user's memory
  • Sensitive prompts, preferences, or retained context could be disclosed
  • Applications may produce manipulated responses based on unauthorized memory changes
  • A broadly exposed unauthenticated proxy could enable large-scale cross-user data access

General mitigation guidance

Mitigation generally focuses on deriving memory ownership from a verified caller identity rather than an unrestricted request header.

Common defensive patterns include:

  • Binding identity to a validated proxy-token fingerprint, operating-system user, or equivalent authenticated principal
  • Restricting header-based identity overrides to loopback or explicitly allowlisted callers
  • Centralizing identity resolution so all HTTP and websocket paths apply the same authorization policy
  • Requiring authentication for network-exposed data-plane routes
  • Binding services to loopback by default unless broader exposure is intentionally required
  • Applying least privilege and isolating stored memory by authenticated tenant or user
  • Treating client-supplied identifiers as untrusted selectors and enforcing object-level authorization before reads or writes

How teams detect issues like this

Detection can include static analysis and code review for request headers or parameters used directly in database, cache, or memory lookups without principal binding. Reviewers can search for duplicated identity-resolution logic across HTTP and websocket handlers, unrestricted identity override headers, published service ports, wildcard host bindings, and deployments that omit authentication requirements. Runtime monitoring can alert on cross-user memory access patterns, unexpected identity changes, and unauthenticated requests to protected routes. Policy enforcement may require authenticated identity derivation and deny network exposure when no access-control mechanism is configured.

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/identity.py
github.comgithub.com/headroomlabs-ai/headroom/pull/2207
vulncheck.comvulncheck.com/advisories/headroom-proxy-treats-the-client-supplied-x-headroom-user-id-header-as-an-authenticated-identity

Frequently asked

questions

Yes, when the proxy's data-plane routes are reachable over a network and the deployment does not enforce authentication or an equivalent caller-binding control. Loopback-only deployments have a narrower exposure scope.

The attacker needs network access to an affected proxy route. In an unauthenticated deployment, no valid user credential may be necessary; otherwise, the relevant access depends on how identity and token validation are configured.

Resolve memory ownership from a verified caller principal, such as an authenticated token or local operating-system identity, and permit header-based overrides only within tightly controlled trust boundaries.

Centralize authorization and identity resolution, test every route—including websocket paths—for object-level access control, restrict service exposure by default, and enforce deployment policies requiring authentication for network-reachable data-plane services.

Find out what's already
exploitable in your codebase.