Executive brief
Headroom is a proxy server that compresses and routes requests to large language model APIs like OpenAI. Prior to version 0.35.0, the Headroom WebSocket server fails to validate the origin of incoming WebSocket connections, allowing malicious browser-based clients to hijack authenticated connections and perform arbitrary LLM requests if the proxy has access to stored API credentials. An attacker could exploit this to make unauthorized API calls, consuming credits and potentially executing harmful instructions through LLM tools.
Technical details
The vulnerability is a Cross-Site WebSocket Hijacking (CSWSH) issue in the WebSocket handler at `/v1/responses` in headroom/providers/proxy_routes.py. The root cause is that the `handle_openai_responses_ws()` method accepts WebSocket connections without validating the `Origin` header before calling `websocket.accept()`, allowing any malicious WebSocket client to connect. The Authorization header is automatically populated from the `OPENAI_API_KEY` environment variable if present, granting the attacker authenticated access to upstream LLM APIs. Attack vector is network-based and requires only that a malicious browser can reach the Headroom proxy server—no explicit authentication is required from the attacker. Once connected, the attacker can send arbitrary `response.create` requests with arbitrary instructions, input prompts, and tool calls. The fix is available in version 0.35.0.
Affected products
- Headroom Labs Headroom prior to 0.35.0
Timeline
- 2026-08-27: disclosed
- 2026-08-13: patched: Version 0.35.0 released