CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-46571

CVE-2025-46571: Stored Cross-Site Scripting (XSS) in Open WebUI

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 7, 2026·6 min read·32 visits

Executive Summary (TL;DR)

A stored XSS vulnerability in Open WebUI allows low-privileged users to achieve remote code execution (RCE) by tricking an administrator into opening an uploaded HTML file, bypassing logical checks to register unauthorized backend functions.

Open WebUI versions prior to 0.6.6 contain a stored cross-site scripting (XSS) vulnerability that allows low-privileged users to upload malicious HTML files containing arbitrary JavaScript. When viewed by an administrator, the executed script can abuse administrative APIs to register malicious functions, leading to remote code execution on the underlying server host.

Vulnerability Overview

Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. The system exposes an API endpoint at /api/v1/files/ to handle user-uploaded documents and static assets. This backend endpoint serves as the primary mechanism for low-privileged users to ingest documents into the platform's knowledge base.

The vulnerability, tracked as CVE-2025-46571, resides in the handling of HTML file uploads. The backend exposes a dedicated router designed to render HTML content within the browser context. This endpoint serves files with the text/html MIME type directly under the application origin, exposing a stored cross-site scripting attack surface.

While default permissions restrict low-privileged users to viewing only their own files, administrative users are allowed to access any uploaded resource. An attacker can leverage this logical permission model to target administrators. By sending a malicious link, the attacker can execute arbitrary script code within the administrative session context.

Root Cause Analysis

The root cause of CVE-2025-46571 lies in the incorrect neutralization of user-supplied HTML content and a subsequent flawed logical access control check. When a file is requested via /api/v1/files/{id}/content/html, the backend uses FastAPI's FileResponse to serve the document. The server returns the content with a Content-Type: text/html response header.

Because the file is served from the same domain as the main web interface, the browser executes any embedded <script> tags within the parent origin. This execution environment permits the malicious script to access sensitive local storage variables, cookies, and authentication headers. Consequently, the script bypasses standard browser security protections like the Same-Origin Policy.

The initial attempt to fix this issue introduced a flawed logical comparison. The code verified the role of the file owner rather than properly restricting administrative access. The logic checked if the owner of the file was not an administrator, but the subsequent exception-raising block was bypassed when the user object existed, allowing execution to fall through.

Code Analysis

The flawed access control verification in commit ef2aeb7c0eb976bac759e59ac359c94a5b8dc7e0 relied on synchronous database checks that failed to raise an HTTP exception when a standard user account was found. The conditional block evaluated the file owner's role but did not stop the request if the owner was a non-admin user.

# Vulnerable implementation in ef2aeb7
file_user = Users.get_user_by_id(file.user_id)
if not file_user.role == "admin":
    if not file_user:
        raise HTTPException(
            status_code=status.HTTP_404_NOT_FOUND,
            detail=ERROR_MESSAGES.NOT_FOUND,
        )

In this logic, if file_user is a regular user (not an admin), not file_user.role == "admin" evaluates to True. The flow enters the block and checks if not file_user:. Since the user exists, not file_user is False. The code skips the raise HTTPException statement and continues execution, serving the file.

# Corrected implementation in v0.6.6
file_user = await Users.get_user_by_id(file.user_id, db=db)
if not file_user or file_user.role != 'admin':
    raise HTTPException(
        status_code=status.HTTP_404_NOT_FOUND,
        detail=ERROR_MESSAGES.NOT_FOUND,
    )

In the corrected version, the logic checks if the user is missing or if the role is not 'admin'. If either condition is true, it immediately raises an HTTP 404 error. This correctly blocks any HTML content uploaded by a low-privileged user from being served.

Exploitation Methodology

To exploit this vulnerability, an attacker must first obtain low-privileged credentials to authenticate to the Open WebUI instance. The attacker uploads a custom HTML document containing a malicious payload to /api/v1/files/. The backend returns a JSON payload containing the assigned id of the uploaded file.

The attacker then targets an administrator by sending a direct link to /api/v1/files/{id}/content/html. Because administrators can bypass the standard file-sharing restrictions, the application permits the rendering of the HTML file. The browser then executes the embedded JavaScript within the administrator's authenticated session.

The malicious script executes administrative API calls in the background. It can target Open WebUI's custom Functions API to register a malicious Filter or Pipeline containing python code. Since Open WebUI evaluates these python-based functions on the server, the administrative API call results in full remote code execution.

Impact Assessment

The impact of CVE-2025-46571 is classified as high because it allows a low-privileged user to achieve administrative access and execute arbitrary commands on the host system. Although classified as Stored XSS, the chain of trust in Open WebUI means that administrative compromise is equivalent to remote code execution.

The CVSS v3.1 base score is 5.4, indicating medium severity due to the requirement of user interaction. However, under CVSS v4.0, the impact metrics yield a base score of 5.3, emphasizing the potential for complete compromise of integrity and availability on subsequent systems if administrators are targeted.

Because Open WebUI operates in self-hosted, often high-privilege environments to manage private AI workloads, achieving remote code execution compromises all connected databases, private model weights, and local system environments. This highlights the severity of the flaw despite the user-interaction requirement.

Remediation and Defense

The primary mitigation for this vulnerability is upgrading Open WebUI to version 0.6.6 or newer. The update implements correct asynchronous database checks that safely restrict HTML document retrieval to resources owned by administrators, preventing standard users from rendering arbitrary scripts.

If immediate upgrades are not possible, administrators should restrict file uploads containing HTML MIME types at the reverse proxy or web application firewall level. Blocking requests ending with .html, .htm, or .xhtml targeted at the files router will mitigate the initial upload phase of the attack.

Additionally, implementing a strict Content Security Policy (CSP) can limit the impact of unexpected XSS. Serving user-uploaded content from a distinct, sandboxed origin ensures that any script execution does not share cookies or local storage with the primary application, neutralizing the session hijacking vector.

Official Patches

open-webuiRelease v0.6.6 containing correct authorization verification logic

Fix Analysis (1)

Technical Appendix

CVSS Score
5.4/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS Probability
0.30%
Top 78% most exploited

Affected Systems

Open WebUI

Affected Versions Detail

Product
Affected Versions
Fixed Version
open-webui
open-webui
< 0.6.60.6.6
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score5.4 (Medium)
EPSS Score0.003 (0.30%)
Exploit Statuspoc
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1185Browser Session Hijacking
Collection
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Known Exploits & Detection

GitHub Security AdvisoryInitial disclosure and detail description of the XSS vulnerability

References & Sources

  • [1]NVD - CVE-2025-46571
  • [2]CVE.org Record
  • [3]GitHub Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-103921
7.4

CVE-2026-103921: TLS Certificate Validation Bypass in @graphql-tools/executor-legacy-ws

A vulnerability in @graphql-tools/executor-legacy-ws prior to version 1.1.35 hardcodes the TLS rejectUnauthorized setting to false for outgoing secure WebSocket (wss://) connections. This defect allows unauthenticated remote attackers to perform Adversary-in-the-Middle (MitM) attacks, capturing or tampering with sensitive connection payloads and subscription data.

Alon Barad
Alon Barad
4 views•6 min read
•about 4 hours ago•CVE-2026-103918
6.5

CVE-2026-103918: Prototype Injection and Denial of Service in oRPC @orpc/zod Smart Coercion Engine

CVE-2026-103918 is a medium-severity vulnerability within the @orpc/zod smart coercion plugin in oRPC. Prior to version 1.14.10, the package fails to sanitize untrusted input keys when performing pre-validation type coercion, allowing prototype injection on the returned request object and Denial of Service.

Amit Schendel
Amit Schendel
10 views•6 min read
•about 5 hours ago•GHSA-3CM4-CCVW-6XR6
7.5

GHSA-3cm4-ccvw-6xr6: Weak Path Access Control and History/Repo-Diff Endpoint Bypass in SiYuan

A weak path access control vulnerability in SiYuan note-taking application allowed authenticated users to bypass restricted file paths by requesting historical backups and git diffs of sensitive configurations, including plain-text authentication tokens.

Amit Schendel
Amit Schendel
9 views•6 min read
•about 6 hours ago•GHSA-4WWP-F6GW-6QM5
7.7

GHSA-4WWP-F6GW-6QM5: Sensitive Information Disclosure via Incomplete Path Blocklist in SiYuan

An incomplete path blocklist in the file retrieval engine of the SiYuan knowledge management platform allows authenticated users to read TLS and CA private key materials directly from the configuration directory.

Alon Barad
Alon Barad
7 views•6 min read
•about 14 hours ago•CVE-2026-88779
8.7

CVE-2026-88779: Improper Restriction of Operations within the Bounds of a Memory Buffer in Citrix NetScaler SAML Authentication Daemon

CVE-2026-88779 is a critical vulnerability in Citrix NetScaler ADC and Citrix NetScaler Gateway affecting systems configured as a SAML Service Provider (SP) or SAML Identity Provider (IdP). An unauthenticated remote attacker can exploit this vulnerability to trigger a buffer overflow in the authentication daemon, resulting in persistent denial of service and appliance crash loops.

Amit Schendel
Amit Schendel
29 views•6 min read
•2 days ago•GHSA-9Q4R-4842-93VW
7.7

GHSA-9Q4R-4842-93VW: Cross-Tenant SQL Injection in Trigger.dev TSQL Query Compiler

A critical cross-tenant SQL injection vulnerability exists in the TSQL query compiler of Trigger.dev, allowing authenticated users to bypass tenant isolation boundaries and read arbitrary ClickHouse analytics logs and execution payloads belonging to other organizations.

Alon Barad
Alon Barad
11 views•6 min read