Open WebUI Stored Cross-Site Scripting Vulnerability in File Upload Feature

Vulnerability

A stored cross-site scripting vulnerability has been identified in Open WebUI versions prior to 0.6.6. Low-privileged users can upload HTML files containing JavaScript via the '/api/v1/files/' endpoint. The uploaded files can only be accessed by admins or the users themselves, which limits the vulnerability's impact. However, if an admin opens a file uploaded by a low-privileged user, the JavaScript code executed could grant the user control over the admin's account, potentially leading to remote code execution.

Impact

Exploitation allows low-privileged users to execute JavaScript in the context of an admin user, potentially leading to remote code execution, as described in GHSA-9f4f-jv96-8766.

Reproduction

To reproduce this vulnerability, upload an HTML file containing JavaScript code, such as a script tag fetching a token from local storage, through the '/api/v1/files/' endpoint. After uploading, the response will include a file ID. This ID can be used to access the file's content via the '/api/v1/files/<file_id>/content/html' endpoint, where the JavaScript will be executed in the browser.

Remediation

Users are advised to update to Open WebUI version 0.6.6 or later, where this vulnerability has been fixed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
4.4
remediation
7.7
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.