CVE-2026-54017: Open WebUI: Path traversal / SSRF in terminal server proxy via encoded path traversal
Open WebUI's terminal-server proxy does not stop encoded path traversal. A non-admin user granted access to a terminal server can send double-encoded dots and escape the intended path or policy scope on that server, reaching other endpoints, files or internal services behind it. Open WebUI 0.9.5 and earlier is affected. Upgrade to 0.9.6.
Published Jun 17, 2026 · Updated Jul 15, 2026 · Analysis Oct 26, 2026
What an attacker can do
The route /api/v1/terminals/{server_id}/{path:path} in backend/open_webui/routers/terminals.py forwards the user's path to an admin-configured terminal server. Originally it appended the path unchecked, so ..%2F..%2F escaped. The later _sanitize_proxy_path decodes once, normalizes, and rejects results starting with ... That blocks single encoding but not double encoding.
A request such as /api/v1/terminals/server1/%252e%252e/%252e%252e/sensitive-file decodes once to %2e%2e/..., which passes the check. The proxy forwards it, and the terminal server decodes it again to ../.. and resolves the traversal.
The attacker is a regular user whom the admin granted access to that terminal server. When the connection has a policy_id, the target is {base_url}/p/{policy_id}/{safe_path}, so traversal can leave the policy namespace and reach other policies or the server root. Where the terminal server routes on to internal services, this becomes SSRF-style access to them. The CVSS score is 7.7, with a changed scope and high confidentiality impact.
Who is affected
The open-webui pip package, version 0.9.5 and earlier. Only deployments that configure terminal servers and grant non-admin users access to them are exposed. Check:
pip show open-webuiThen review your terminal server connections in the admin settings, in particular those that set a policy_id or that can reach internal services.
open-webui
- Ecosystem
- PyPI
- Affected
- <= 0.9.5
- Fixed in
- 0.9.6
- Check
pip show open-webui
How to fix it
Upgrade to Open WebUI 0.9.6:
pip install --upgrade open-webui==0.9.6The advisory's recommended fix is to decode the proxy path repeatedly, up to 8 times, until it stops changing, and only then normalize and check it for a leading ... That rejects %2e%2e, %252e%252e and deeper encodings. The advisory lists no workaround. Restricting which users have access to terminal servers reduces exposure, though the advisory does not recommend it.
How to tell if you were hit
Search proxy and application logs for requests to /api/v1/terminals/ that contain %252e, %25252e or %2e%2e. Check the terminal server's own logs for requests with .. segments, or for paths outside the policy prefix /p/{policy_id}/. Look for access to files or internal endpoints that the user's policy should not allow.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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:
- Raw path forwarding / single-encoded traversal (original report).
- A bypass of the subsequently-added
_sanitize_proxy_pathmitigation 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:
# 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/secretsThis 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:
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-fileThe 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:
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 NoneThis 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_pathmitigation.
Credited to burg0w, sermikr0, Classic298.
Questions
- Can an unauthenticated visitor exploit this?
No. The route needs a verified user, and has_connection_access must pass, so the admin must have granted that user access to the terminal server.
- Was the single-encoded variant already fixed?
Yes. _sanitize_proxy_path closed ..%2F traversal. The double-encoded %252e%252e variant bypassed it, and this advisory covers both.
- Which version fixes CVE-2026-54017?
Open WebUI 0.9.6. The advisory's text does not spell out the code change that shipped, but its patched-version field is 0.9.6.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
