Open WebUI Stored XSS Vulnerability via Audio Transcription Endpoint (CVE-2026-45315)
Open WebUI is vulnerable to stored XSS via an attacker-controlled file extension in the /api/v1/audio/transcriptions endpoint (CVE-2026-45315), allowing a verified user with the chat.stt permission to upload a polyglot WAV+HTML file, tricking other users into executing arbitrary script code within the Open WebUI origin, leading to session token theft and full account takeover.
CVE search metadata
CVE search record: CVE-2026-45315. KEV: no. Product: open-webui (<= 0.9.2). Brief: Open WebUI Stored XSS Vulnerability via Audio Transcription Endpoint (CVE-2026-45315). Brief link: https://feed.craftedsignal.io/briefs/2026-05-open-webui-xss/
Triage facts
Revision 1- Applicability
- open-webui (<= 0.9.2)
- Evidence
- Unknown
- Severity
- High
- Sources
- 2 public sources
- Freshness
- Revision 1May 14, 20:31 UTC
- Detection
- 2 rules
- Vulnerabilities
- 1 CVE
Open WebUI version 0.9.2 and earlier is vulnerable to a stored cross-site scripting (XSS) attack. The vulnerability resides in the /api/v1/audio/transcriptions endpoint, which allows users to upload audio files for transcription. An attacker with a verified account and the default-enabled chat.stt permission can upload a specially crafted file disguised as audio but containing malicious HTML and JavaScript code. The server saves the file with an extension derived directly from the user-supplied filename without proper validation, enabling the stored XSS.
Attack Chain
- An attacker with a verified user account authenticates to the Open WebUI instance.
- The attacker crafts a polyglot WAV+HTML file, containing both valid WAV audio data and embedded JavaScript code designed for XSS.
- The attacker uploads the malicious file to the
/api/v1/audio/transcriptionsendpoint, naming the file with an.htmlextension (e.g.,pwn.html). - The server saves the file to the
CACHE_DIR/audio/transcriptions/directory, using the attacker-supplied.htmlextension. - The server generates a unique identifier (UUID) for the file and constructs the final file path using the UUID and the attacker-supplied extension.
- A victim user clicks a link to the cached file served by the
/cache/{path}route (e.g.,/cache/audio/transcriptions/<uuid>.html). - The server serves the file with a
Content-Type: text/htmlheader based on the.htmlextension. - The victim's browser executes the embedded JavaScript code in the context of the Open WebUI origin, allowing the attacker to steal sensitive information, such as the JWT token stored in
localStorage, leading to account takeover.
Impact
This stored XSS vulnerability (CVE-2026-45315) allows an attacker to execute arbitrary JavaScript code within the Open WebUI application on behalf of a victim user. An attacker can steal the victim's session token (JWT), which is stored in localStorage, and the OAuth token cookie is non-HttpOnly, gaining complete control over the victim's account. This includes the ability to view sensitive data, modify settings, and perform actions as the compromised user. Exploitation requires only a single click by the victim.
Recommendation
- Apply the patch or upgrade to a version of Open WebUI greater than 0.9.2 to remediate CVE-2026-45315.
- Implement strict validation of file extensions and MIME types on the
/api/v1/audio/transcriptionsendpoint to prevent uploading of malicious files. - Configure the
/cache/{path}route to forceContent-Disposition: attachmentandX-Content-Type-Options: nosniffto prevent the browser from interpreting files based on their content. - Move the JWT token to an
HttpOnlycookie to prevent JavaScript code from accessing it. - Set the
SameSiteattribute for the OAuth token cookie toLaxto mitigate cross-site request forgery (CSRF) attacks. - As a workaround, set
USER_PERMISSIONS_CHAT_STT=Falseto revoke upload rights from non-administrators.
Detection coverage 2
Detect CVE-2026-45315 Exploitation Attempt — Open WebUI Audio Transcription XSS
highDetects attempts to exploit CVE-2026-45315, the Open WebUI audio transcription XSS vulnerability, by monitoring for uploads of files with HTML extensions to the audio transcription endpoint.
Detect CVE-2026-45315 Exploitation — Open WebUI Serving HTML from Cache Directory
mediumDetects potential exploitation of CVE-2026-45315 by monitoring for requests serving HTML files from the Open WebUI cache directory.
Detection queries are available on the platform. Get full rules →