CVE-2026-54017: open-webui: double-encoded path traversal in terminal proxy
GHSA-r2wg-2mcr-66rv HIGH CISA: TRACK*CVE-2026-54017 is a path traversal and SSRF vulnerability in open-webui's terminal-server reverse proxy, where any authenticated user granted terminal access can craft double-encoded dot sequences (`%252e%252e`) that survive the single-pass sanitization check and are re-decoded by the upstream terminal server, escaping the intended path scope to read arbitrary files or reach internal services. EPSS places this in the top 88th percentile for exploitation likelihood and open-webui carries 107 total CVEs — a signal of persistent security-maturity risk in this package — and the CVSS scope-change (S:C) reflects that impact extends beyond the open-webui instance itself into adjacent terminal-server infrastructure. Exploitation requires only a low-privilege authenticated account with terminal access, making this realistic for insider-threat or compromised-developer scenarios in AI coding-assistant or LLM platform deployments. Upgrade immediately to open-webui 0.9.6; if patching is not immediately possible, revoke non-admin terminal server access grants until remediated.
What is the risk?
HIGH. CVSS 7.7 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N) is network-exploitable with low complexity, low privilege, no user interaction, and a scope change — confidentiality impact is rated High, meaning sensitive data on the terminal-server host is fully at risk. The double-encoding bypass (Vector 2) is unpatched in all versions ≤ 0.9.5 and the technique is trivially known. EPSS top 88th percentile is a strong exploitation-probability signal. Risk is scoped to deployments that expose terminal server connections to non-admin users, which is common in developer-facing AI platforms. The 107-CVE package history and OpenSSF score of N/A reflect systemic supply chain security concerns for open-webui.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Open WebUI | pip | <= 0.9.5 | 0.9.6 |
Do you use Open WebUI? You're affected.
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Patch
Upgrade open-webui to ≥ 0.9.6 immediately; this release implements iterative URL-decoding until stable before normpath, closing the double-encoding bypass.
-
Interim workaround
Disable terminal server access for all non-admin users via the open-webui admin panel until patching is complete.
-
Access audit
Review all
has_connection_accessgrants and revoke terminal server access from any user without a demonstrated operational need. -
Network segmentation
Ensure terminal servers cannot reach cloud metadata endpoints (169.254.169.254, 169.254.170.2), internal databases, or ML service APIs; apply egress filtering.
-
Detection
Alert on requests containing
%25sequences in the path segment of/api/v1/terminals/routes; review upstream terminal-server access logs for../or%2e%2epatterns. -
Patch validation
Confirm the iterative decode loop replacing the single
unquote()call is present in your deployed_sanitize_proxy_pathfunction.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-54017?
CVE-2026-54017 is a path traversal and SSRF vulnerability in open-webui's terminal-server reverse proxy, where any authenticated user granted terminal access can craft double-encoded dot sequences (`%252e%252e`) that survive the single-pass sanitization check and are re-decoded by the upstream terminal server, escaping the intended path scope to read arbitrary files or reach internal services. EPSS places this in the top 88th percentile for exploitation likelihood and open-webui carries 107 total CVEs — a signal of persistent security-maturity risk in this package — and the CVSS scope-change (S:C) reflects that impact extends beyond the open-webui instance itself into adjacent terminal-server infrastructure. Exploitation requires only a low-privilege authenticated account with terminal access, making this realistic for insider-threat or compromised-developer scenarios in AI coding-assistant or LLM platform deployments. Upgrade immediately to open-webui 0.9.6; if patching is not immediately possible, revoke non-admin terminal server access grants until remediated.
Is CVE-2026-54017 actively exploited?
No confirmed active exploitation of CVE-2026-54017 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-54017?
1. **Patch**: Upgrade open-webui to ≥ 0.9.6 immediately; this release implements iterative URL-decoding until stable before normpath, closing the double-encoding bypass. 2. **Interim workaround**: Disable terminal server access for all non-admin users via the open-webui admin panel until patching is complete. 3. **Access audit**: Review all `has_connection_access` grants and revoke terminal server access from any user without a demonstrated operational need. 4. **Network segmentation**: Ensure terminal servers cannot reach cloud metadata endpoints (169.254.169.254, 169.254.170.2), internal databases, or ML service APIs; apply egress filtering. 5. **Detection**: Alert on requests containing `%25` sequences in the path segment of `/api/v1/terminals/` routes; review upstream terminal-server access logs for `../` or `%2e%2e` patterns. 6. **Patch validation**: Confirm the iterative decode loop replacing the single `unquote()` call is present in your deployed `_sanitize_proxy_path` function.
What systems are affected by CVE-2026-54017?
This vulnerability affects the following AI/ML architecture patterns: ML UI platforms (open-webui ≤ 0.9.5 with terminal server enabled), Local LLM inference stacks front-ended by open-webui (Ollama, vLLM, LiteLLM), AI coding-assistant and developer platforms with multi-user terminal access, Enterprise AI platforms with internal ML microservices reachable via terminal server SSRF, Cloud-hosted AI deployments with IMDSv1 metadata endpoints accessible from terminal server.
What is the CVSS score for CVE-2026-54017?
CVE-2026-54017 has a CVSS v3.1 base score of 7.7 (HIGH). The EPSS exploitation probability is 0.52%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0025 Exfiltration via Cyber Means AML.T0037 Data from Local System AML.T0049 Exploit Public-Facing Application AML.T0085 Data from AI Services Compliance Controls Affected
What are the technical details?
Original Advisory
### Summary The terminal-server reverse proxy in `backend/open_webui/routers/terminals.py` does not fully confine the user-controlled `path` segment before forwarding it to an admin-configured terminal server. An authenticated user who has been granted access to a terminal server can craft `path` values containing encoded `../` traversal sequences that escape the intended path (or policy) scope on that server, reaching unintended endpoints and files on the terminal-server host. Where the terminal server fans requests out to internal services, this also gives SSRF-style reach into those services. This is a separate code path from the `/api/v1/retrieval/process/web` SSRF (GHSA-c6xv-rcvw-v685), with its own input. Two distinct vectors are consolidated here: 1. Raw path forwarding / single-encoded traversal (original report). 2. A bypass of the subsequently-added `_sanitize_proxy_path` mitigation using double-encoded dots (`%252e%252e`). The attacker-controlled input is the request `path`, supplied by the non-admin user, not anything an administrator configures, so this is not an admin-trust / Rule-9 situation. ### Affected code The proxy route forwards an arbitrary trailing path to the configured terminal server: ```python # routers/terminals.py @router.api_route('/{server_id}/{path:path}', methods=PROXY_METHODS) async def proxy_terminal(server_id, path, request, user=Depends(get_verified_user)): ... safe_path = _sanitize_proxy_path(path) if safe_path is None: return JSONResponse({'error': 'Invalid path'}, status_code=400) target_url = f'{base_url}/{safe_path}' policy_id = connection.get('policy_id') if policy_id: target_url = f'{base_url}/p/{policy_id}/{safe_path}' ``` Access requires `has_connection_access(user, connection, ...)`, i.e. a non-admin user the administrator has granted to that terminal server. ### Vector 1 — single-encoded traversal (original) The path was originally concatenated to the base URL with no sanitization (`target_url = f"{base_url}/{path}"`), so single-encoded traversal escaped the intended scope: ``` GET /api/v1/terminals/server1/..%2F..%2F..%2Finternal-api/secrets # proxied to: {base_url}/../../../internal-api/secrets ``` This vector is closed at HEAD: `_sanitize_proxy_path` now URL-decodes once, runs `posixpath.normpath`, strips leading slashes, and rejects results beginning with `..` (`unquote('..%2F..%2F') -> '../../' -> normpath -> '../..'` -> rejected). ### Vector 2 — double-encoded bypass of `_sanitize_proxy_path` `_sanitize_proxy_path` decodes the path only once before the `..` check, so a double-encoded payload survives: ```python def _sanitize_proxy_path(path: str) -> str | None: decoded = unquote(path) # single decode pass only normalized = posixpath.normpath(decoded) cleaned = normalized.lstrip('/') if cleaned.startswith('..') or cleaned == '.': return None ... ``` `unquote('%252e%252e/secret')` yields `%2e%2e/secret` (not `..`), which `normpath` leaves unchanged and which does not start with `..`, so it passes the check. The proxy then forwards `{base_url}/%2e%2e/secret`, and the upstream terminal server decodes `%2e%2e` into `..` and resolves the traversal the check was meant to prevent. ``` GET /api/v1/terminals/server1/%252e%252e/%252e%252e/sensitive-file # passes _sanitize_proxy_path as %2e%2e/%2e%2e/sensitive-file # upstream decodes -> ../../sensitive-file ``` The `policy_id` form (`{base_url}/p/{policy_id}/{safe_path}`) is the higher-impact target: traversal escapes the policy namespace and reaches other policies or the terminal-server root. ### Impact An authenticated user with access to a terminal server can escape the intended path/policy scope on that server, reaching unintended endpoints and files, and, where the terminal server routes onward to internal services, reach those services. CWE-22 (Path Traversal) and CWE-918 (SSRF). ### Fix Decode the proxy path until it is stable before normalising and checking, so no depth of encoding can smuggle a traversal sequence past the check to be re-decoded upstream: ```python decoded = path for _ in range(8): once = unquote(decoded) if once == decoded: break decoded = once normalized = posixpath.normpath(decoded) cleaned = normalized.lstrip('/') if cleaned.startswith('..') or cleaned == '.': return None ``` This rejects `%2e%2e`, `%252e%252e`, `%25252e%25252e`, `..%2f..%2f`, etc., while leaving legitimate paths (including singly-encoded characters such as `%20`) intact. ### Credits - **Tulgaaaaaaaa** — original report (terminal-proxy path SSRF / single-encoded traversal). - **sermikr0** — double-encoded (`%252e%252e`) bypass of the `_sanitize_proxy_path` mitigation.
Exploitation Scenario
A developer account with legitimate open-webui terminal server access — typical in AI coding-assistant or model-management platforms — issues a GET request to `/api/v1/terminals/<server_id>/%252e%252e/%252e%252e/etc/passwd`. The `_sanitize_proxy_path` function decodes `%252e%252e` once to `%2e%2e`, which does not match the `..` pattern check, and passes validation. The proxy forwards `{base_url}/%2e%2e/%2e%2e/etc/passwd` to the upstream terminal server, which decodes `%2e%2e` to `..` and resolves the traversal, returning `/etc/passwd`. In a higher-value scenario, the attacker targets policy-scoped connections — crafting `%252e%252e/p/other-policy/sensitive-endpoint` to jump between policy namespaces — or substitutes the file path with an internal ML service URL or cloud metadata endpoint (`169.254.169.254/latest/meta-data/iam/security-credentials/`), pivoting from the open-webui instance into cloud IAM credentials for the entire ML infrastructure.
Weaknesses (CWE)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Primary
CWE-918 Server-Side Request Forgery (SSRF)
Primary
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-918 Server-Side Request Forgery (SSRF) CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N References
Timeline
Related Vulnerabilities
CVE-2026-44551 9.1 open-webui: LDAP auth bypass — full account takeover
Same package: open-webui CVE-2026-45672 8.8 open-webui: code exec gate bypass via API endpoint
Same package: open-webui CVE-2026-44552 8.7 open-webui: Redis cache poisoning enables cross-instance tool hijack
Same package: open-webui CVE-2025-64495 8.7 Open WebUI: XSS-to-RCE via malicious prompt injection
Same package: open-webui CVE-2026-45315 8.7 open-webui: stored XSS → JWT theft and admin takeover
Same package: open-webui