/

CVE-2026-54017

Severity:

HIGH RISK

(7.7)

Path Traversal and SSRF (CWE-22) in Open WebUI Proxy

CVE-2026-54017

Analyzed

Vulnerability type

Category:

Path Traversal / Server-Side Request Forgery

CWE:

CWE-22, CWE-918

Impact:

Unauthorized File Access and Server-Side Request Forgery

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Open WebUI's terminal-server reverse proxy insufficiently sanitizes a user-controlled path segment before forwarding it to an admin-configured terminal server.

An authenticated user with terminal access can craft encoded traversal sequences to escape the intended path scope, potentially accessing unintended endpoints, files, or internal services the terminal server can reach.

Affected context

This vulnerability arises in Open WebUI deployments that expose the terminal-server reverse proxy in backend/open_webui/routers/terminals.py to authenticated users who have been granted access to at least one terminal server.

The issue manifests when the proxy forwards a user-supplied path to a terminal backend without robust normalization and validation of traversal sequences.

Environments where the terminal server can reach local files, privileged endpoints, or additional internal services are at elevated risk.

Exploit preconditions

  • Attack surface: HTTP(S) requests sent to the Open WebUI terminal-server reverse proxy endpoint.
  • Required access: Authenticated Open WebUI account with permission to use at least one configured terminal server.
  • Trigger point: Supplying crafted path values, including encoded or double-encoded ../ sequences, in requests routed through the terminal proxy.
  • Why exploitation is possible: The proxy relies on incomplete path sanitization that does not fully normalize or reject traversal sequences (including double-encoded dots) before forwarding to the terminal server, allowing the effective request path to escape the intended scope.

Why this happens

The root cause is incomplete normalization and validation of a user-controlled URL path before it is forwarded by a reverse proxy component.

The code path attempts to confine requests but fails to correctly canonicalize and re-validate encoded traversal patterns (including %2e%2e and %252e%252e), allowing directory traversal relative to the terminal server's base.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory for escaping an intended directory or policy boundary, and CWE-918: Server-Side Request Forgery (SSRF) where the proxy can be abused to reach internal services or unexpected endpoints accessible from the terminal backend.

Potential impact

  • Unauthorized access to files or endpoints on the terminal-server host that should not be reachable via the proxy
  • SSRF-style access to internal services that the terminal server can communicate with
  • Bypassing application-level access controls enforced only at the proxy layer
  • Discovery of internal network structure and services reachable from the terminal backend
  • Potential chaining with other vulnerabilities on internal targets for further compromise

General mitigation guidance

Effective mitigation focuses on strict path canonicalization and explicit allowlisting of reachable resources.

Common defensive patterns include:

  • Normalizing and resolving paths server-side before forwarding, then validating that the resolved path remains within an explicitly allowed base directory or prefix.
  • Rejecting or strictly constraining any use of .. segments, including encoded and double-encoded variants, and failing closed on malformed encodings.
  • Treating user-supplied proxy paths as opaque, and instead mapping user actions to predefined, server-side route templates or resources.
  • Applying defense-in-depth on terminal servers by limiting which internal hosts, ports, and files they can access, and by running them with least-privilege accounts and minimal filesystem exposure.
  • Segmenting internal services behind network policies or firewalls so that even if the proxy is misused, reachable targets are minimized.

How teams detect issues like this

Detection typically combines code-focused and runtime monitoring approaches:

  • Static analysis rules that flag reverse-proxy logic where user-controlled path components are concatenated, joined, or forwarded without rigorous normalization and boundary checks.
  • Code review checklists that specifically inspect proxy / gateway components for path traversal protections, canonicalization steps, and strict allowlists rather than blacklist-style checks.
  • Logging and monitoring of terminal-proxy requests, alerting on suspicious patterns such as ../, encoded traversal sequences, or unusually deep path hierarchies.
  • Web application firewalls or API gateways configured with rules to block traversal-like sequences and anomalous encodings in proxy-targeted paths.
  • Periodic security testing focused on proxy endpoints, including fuzzing encoded and double-encoded path segments to verify that traversal attempts are blocked.

Sources

SourceLink
github.comgithub.com/open-webui/open-webui/security/advisories/GHSA-r2wg-2mcr-66rv

Frequently asked

questions

Yes, but it requires authentication. An attacker must be able to send requests to the Open WebUI terminal-server proxy endpoint and have a valid account with terminal access.

The attacker must be an authenticated non-admin user who has been granted access to at least one terminal server. No administrative privileges are required, and the exploit uses the attacker-supplied path rather than administrator configuration.

The most robust pattern is to canonicalize and resolve the requested path on the server, verify that the resolved target remains within an explicitly allowed base scope (directory or route prefix), and reject any request that fails this check, including those containing encoded or double-encoded traversal sequences.

Treat any proxy target components derived from user input as untrusted, use strict allowlists and server-side mapping instead of forwarding raw paths, normalize all inputs before checks, and apply defense-in-depth via network segmentation, least privilege on backend services, and automated security review of gateway and proxy code paths.

Find out what's already
exploitable in your codebase.