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-idvalue 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.

