CVE-2026-59224: Open WebUI: Terminal proxy forwards a spoofable, integrity-unbound user identity to the upstream (X-User-Id header and ws_terminal session_id query injection)
The terminal proxy in backend/open_webui/routers/terminals.py forwards the Open WebUI user’s identity to the upstream terminal server / backend coordinator as an authorization claim, with no cryptographic binding to the session that produced it. The forwarded identity is attacker-influenceable on both proxy paths:
- HTTP path (
proxy_terminal) setsheaders['X-User-Id'] = user.id. Upstreams that trustX-User-Idas identity receive it unsigned, so an attacker who can reach the upstream by other means (directly, a compromised peer, SSRF) can spoof it. - WebSocket path (
ws_terminal) is exploitable through Open WebUI itself, with no “other means” required. It interpolates the path parametersession_iddirectly into the upstream URL and then appends?user_id=<caller>:
upstream_url = f'{ws_base}/p/{policy_id}/api/terminals/{session_id}'
upstream_url += f'?{urllib.parse.urlencode({"user_id": user.id})}'
session_id is neither validated nor URL-encoded (the HTTP sibling runs _sanitize_proxy_path; this path runs nothing). An encoded ?/& smuggled through session_id survives Open WebUI’s single decode and is re-decoded by the upstream, injecting an attacker-chosen user_id ahead of the appended one. Query parsing binds the first occurrence, so the backend coordinator resolves the spoofed user’s terminal scope.
References
- github.com/advisories/GHSA-j657-m4c4-24jq
- github.com/open-webui/open-webui/commit/5f3a628a8d291bb5d33e1a0b0c89fb62a2927934
- github.com/open-webui/open-webui/pull/26042
- github.com/open-webui/open-webui/releases/tag/v0.10.0
- github.com/open-webui/open-webui/security/advisories/GHSA-j657-m4c4-24jq
- nvd.nist.gov/vuln/detail/CVE-2026-59224
Code Behaviors & Features
Detect and mitigate CVE-2026-59224 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →