CVE-2026-28788: Open WebUI's process_files_batch() endpoint missing ownership check, allows unauthorized file overwrite
Open WebUI before 0.8.6 lets any logged-in user overwrite any file's content by ID through POST /api/v1/retrieval/process/files/batch, because the endpoint has no ownership check. The overwritten text is then served to the model through RAG. Upgrade open-webui to 0.8.6.
Published Mar 27, 2026 · Analysis Oct 31, 2026
What an attacker can do
process_files_batch() in backend/open_webui/routers/retrieval.py was written as an internal helper. The knowledge base router calls it after its own access checks. The same function is also exposed as an HTTP route that only requires get_verified_user, so any account passes. For each file in the request it takes the content from the request body, hashes it and calls Files.update_file_by_id() with no test that the caller owns the file.
An attacker needs a valid account of any role and a file UUID. Any user who can read a shared knowledge base gets the UUIDs from GET /api/v1/knowledge/{id}/files. That turns read access into write access (CWE-639, broken object level authorization).
The result is RAG poisoning. Other users who chat with the knowledge base get answers built from the attacker's text, which can include instructions the model follows. If the deployment has a code interpreter or function calling, that can lead further. The original content is replaced with no notice to the owner and no audit entry. The reporter tested version 0.8.3 on a default Docker setup.
Who is affected
open-webui before 0.8.6, in multi-user deployments where knowledge bases are shared. Single-user installs have no one else to attack. Check the version:
pip show open-webuiFor Docker, read the version in the admin settings About page or from the image tag.
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.6For Docker, pull a newer image and recreate the container. The GitHub release notes for v0.8.6 do not list this fix by name, so confirm the version rather than relying on the changelog. The advisory's suggested fix is a check that the file owner is the caller or an admin before any write. After upgrading, review knowledge base files for content you did not put there, since earlier tampering stays in place.
How to tell if you were hit
Check web server or reverse proxy logs for POST /api/v1/retrieval/process/files/batch calls from non-admin users, since the Open WebUI frontend never calls that route directly. Pair them with GET /api/v1/knowledge/{id}/files from the same account. Compare current file contents and hashes in shared knowledge bases with your source documents. Ask the model about a document and look for text that is not in the original.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Any authenticated user can overwrite any file's content by ID through the POST /api/v1/retrieval/process/files/batch endpoint. The endpoint performs no ownership check, so a regular user with read access to a shared knowledge base can obtain file UUIDs via GET /api/v1/knowledge/{id}/files and then overwrite those files, escalating from read to write. The overwritten content is served to the LLM via RAG, meaning the attacker controls what the model tells other users.
Details
The process_files_batch() function in backend/open_webui/routers/retrieval.py appears to be designed as an internal helper. The knowledge base router (add_files_to_knowledge_batch() in knowledge.py) imports and calls it directly after performing its own ownership and access control checks. The frontend never calls the retrieval route directly; all legitimate UI flows go through the knowledge base wrapper.
However, the function is also exposed as a standalone HTTP endpoint via @router.post(...). This direct route only requires get_verified_user (any authenticated user) and performs no ownership check of its own:
for file in form_data.files:
text_content = file.data.get("content", "") # attacker-controlled
file_updates.append(FileUpdateForm(
hash=calculate_sha256_string(text_content),
data={"content": text_content}, # written to DB
))
for file_update, file_result in zip(file_updates, file_results):
Files.update_file_by_id(id=file_result.file_id, form_data=file_update)
# ^^^ no ownership checkThere is no verification that file.user_id == user.id before the write. Any authenticated user who knows a file UUID can overwrite that file.
How an attacker obtains file UUIDs:
Same as with read access, any user who can see a knowledge base can retrieve file IDs for every document in it via GET /api/v1/knowledge/{id}/files. In deployments where knowledge bases are shared across teams, this gives any regular user a list of valid targets.
Suggested fix: Add an ownership check before writing:
for file in form_data.files:
db_file = Files.get_file_by_id(file.id)
if not db_file or (db_file.user_id != user.id and user.role != "admin"):
file_errors.append(BatchProcessFilesResult(
file_id=file.id, status="failed",
error="Permission denied: not file owner",
))
continueClassification:
- CWE-639: Authorization Bypass Through User-Controlled Key
- OWASP API1:2023: Broken Object Level Authorization
Tested on Open WebUI 0.8.3 using a default Docker configuration.
PoC
Prerequisites:
- Default Open WebUI installation (Docker:
ghcr.io/open-webui/open-webui:main) - An admin or user creates a knowledge base with shared read access and uploads a file
- A regular user account exists (the attacker)
Obtaining the file UUID (attacker):
GET /api/v1/knowledge/{kb_id}/filesThis returns metadata for all files in the KB, including their UUIDs.
Exploit (attacker):
python3 poc_exploit.py --url http://<host>:3000 --file-id <target-file-uuid> -t <attacker-jwt>The PoC script: poc_exploit.py
- Authenticates as the attacker
- Overwrites the target file via
POST /api/v1/retrieval/process/files/batchwith a canary payload containing a unique marker string - Reads the file back and confirms the attacker's content replaced the original
Verifying RAG poisoning:
After the overwrite, log in as any other user, start a chat with the poisoned knowledge base attached, and ask about the document. The model's response will include the attacker's canary string (BOLA-<marker>), confirming that attacker-controlled content reached the LLM and influenced the response.
No special tooling is required. The script uses only Python 3 standard library (urllib).
Impact
Who is affected: Any multi-user Open WebUI deployment where knowledge bases are shared. The attacker needs a valid account (any role) and a target file UUID, which is available through any knowledge base they have read access to.
What can happen:
- RAG poisoning: The overwritten content is served to the LLM via RAG. The attacker controls what the model tells every user who queries that knowledge base. This includes the ability to inject instructions the model will follow, which could lead to further exploitation depending on what tools and capabilities are available in the deployment (e.g. code interpreter, function calling).
- Silent data corruption: The original file content is permanently replaced with no indication to the file owner or other users that it has changed.
- No audit trail: Nothing records that an unauthorized user modified the file.
The core issue is that a function designed as an internal helper is exposed as a public endpoint without its own authorization checks. A user with read-only access to a knowledge base can escalate to write access over any file in it.
Disclaimer on the use of AI powered tools
The research and reporting related to this vulnerability was aided by the help of AI tools.
Credited to Inar1Dev.
Questions
- Does the attacker need to be an admin?
No. Any authenticated account works, and a file UUID. A user with read access to a shared knowledge base can get UUIDs from the knowledge files endpoint.
- Does this give code execution?
Not directly. It lets the attacker rewrite file content that the LLM reads through RAG. Follow-on harm depends on tools such as the code interpreter or function calling.
- Is there a public proof of concept?
The advisory includes a Python script and a method to verify it. No source I read reports use in the wild.
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
