CVE-2026-54011: Open WebUI Mermaid XSS Vulnerability – Authentication Required
Open WebUI, a self-hosted AI platform, contains a cross-site scripting (XSS) vulnerability in its Markdown preview feature. When users preview files containing Mermaid diagrams, the application unsafely renders and injects the generated SVG directly into the browser's DOM using innerHTML. Because Mermaid's security level is set to 'loose', an attacker can embed malicious JavaScript within a Mermaid diagram that executes in the victim's browser with the privileges of the Open WebUI application. An authenticated user must view a malicious Markdown file for the attack to succeed. This vulnerability is resolved in version 0.9.6.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.7 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
- Weaknesses (CWE)
- CWE-79
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-23 / 2026-06-25
NVD description (verbatim)
Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.6,Open WebUI renders Mermaid blocks from Markdown files in the file preview panel and inserts the generated SVG into the DOM using innerHTML. Because Mermaid is configured with securityLevel: 'loose', attacker-controlled Mermaid content can be rendered unsafely in this flow. A working payload was validated through the Markdown preview path, resulting in JavaScript execution in the victim’s browser under the application origin. This vulnerability is fixed in 0.9.6.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from unsafe DOM manipulation in Open WebUI's file preview component. The application processes Mermaid diagram syntax from Markdown files and converts it to SVG using the Mermaid library configured with securityLevel set to 'loose'—a mode that permits script execution within Mermaid diagrams. The resulting SVG is inserted into the page DOM via innerHTML rather than safer methods like textContent or sanitized insertion, allowing embedded JavaScript to execute under the application's origin. Attack vectors include file uploads or crafted Markdown content accessible through the preview interface. The CWE-79 classification confirms this as a classic stored or reflected XSS vulnerability depending on how the Markdown is sourced.
Business impact
Exploitation allows attackers to steal session tokens, modify application data, harvest user information, or escalate privileges within the Open WebUI instance. For self-hosted deployments, the impact is scoped to the affected instance and its authorized users, but could compromise sensitive AI models, training data, or inference outputs stored locally. Organizations using Open WebUI for internal AI tasks face data confidentiality and integrity risks. The requirement for authentication (PR:L in the CVSS vector) and user interaction (UI:R) limits the immediate blast radius but does not eliminate the threat, particularly in environments where users may inadvertently preview untrusted content.
Affected systems
Open WebUI versions prior to 0.9.6 are affected. The vulnerability requires an authenticated user to preview a Markdown file containing malicious Mermaid diagram syntax. Self-hosted instances are at direct risk; the CVSS vector reflects network-accessible deployment scenarios. No evidence indicates that cloud-hosted or managed versions of Open WebUI are exposed, though administrators should verify their specific deployment configuration.
Exploitability
The vulnerability is exploitable by any authenticated user who can control or influence Markdown file content visible in the preview panel. The attack requires user interaction—the victim must view the malicious preview—and the attacker must have authentication to the Open WebUI instance or the ability to inject content into a file accessible to authenticated users. The low complexity (AC:L) and lack of special access requirements (PR:L refers to low-privileged authentication) make this practical to exploit in multi-user environments or scenarios where file upload is enabled. No public exploit code or widespread weaponization has been reported, and the vulnerability is not yet listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
Remediation
Update Open WebUI to version 0.9.6 or later. This release addresses the vulnerability by implementing safe DOM insertion methods and likely tightening Mermaid's security configuration. Organizations unable to upgrade immediately should restrict file preview functionality to trusted content, disable Mermaid diagram rendering if not essential, or enforce network-level access controls to limit exposure to authenticated users only.
Patch guidance
Verify your current Open WebUI version (typically found in Settings or About sections of the application). Upgrade to version 0.9.6 or any subsequent release according to your deployment model: for Docker deployments, pull the latest image tag; for source installations, rebuild from the latest branch. Test the upgrade in a non-production environment first to ensure compatibility with your configuration and any custom integrations. Review release notes to confirm security fixes are included.
Detection guidance
Monitor for Markdown files with suspicious Mermaid diagram syntax containing script tags, event handlers, or embedded JavaScript. Log and alert on file preview events, especially those involving recently uploaded or externally sourced content. Inspect access logs for unusual patterns of file preview activity. Web application firewalls (WAFs) can detect payloads within Mermaid diagram blocks if rules are tuned to recognize common XSS patterns. Endpoint detection and response (EDR) tools may identify anomalous JavaScript execution originating from the Open WebUI browser context.
Why prioritize this
While the CVSS score of 8.7 reflects high severity, the requirement for authentication and user interaction reduces immediate critical urgency compared to unauthenticated remote code execution vulnerabilities. However, in multi-user or file-sharing environments, the risk escalates. Prioritize patching if Open WebUI handles sensitive data, if file upload is enabled, or if users may preview untrusted content. Low-risk deployments (single user, no external file ingestion) may defer patching with compensating controls in place.
Risk score, explained
The CVSS 3.1 score of 8.7 (HIGH) reflects high impact to confidentiality and integrity (C:H, I:H), network accessibility (AV:N), and low attack complexity (AC:L). The score is tempered by the requirement for authenticated access (PR:L) and user interaction (UI:R), and by the absence of availability impact (A:N). The Changed Scope (S:C) attribute indicates potential impact beyond the immediate application boundary, relevant for multi-user deployments where one user's session compromise could affect others. Organizations rating this as critical should consider their threat model and the trustworthiness of users with authentication access.
Frequently asked questions
Can this vulnerability be exploited without user interaction?
No. The attack requires an authenticated user to manually view the Markdown file preview. An attacker cannot trigger the vulnerability passively or through automated means; the victim must initiate the preview action.
Does this affect Open WebUI instances that don't use Markdown previews?
If Markdown preview functionality is disabled or not used, the attack surface is reduced but not eliminated. We recommend upgrading regardless, as other vectors for Mermaid rendering may exist in the application.
What should I do if I suspect this vulnerability was exploited?
Review application access logs for suspicious file preview activity and session tokens created around the time of suspected preview events. Check browser history and active sessions for unauthorized access. Consider rotating authentication credentials and monitoring for lateral movement or data exfiltration from the affected instance.
Is there a public exploit for this vulnerability?
As of the publication date, no public exploit code has been disclosed, and the vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog. However, proof-of-concept code may emerge; upgrade promptly to avoid exposure once tools become available.
This analysis is based on the CVE record and published vendor information as of the modification date. SEC.co makes no warranty regarding the completeness or accuracy of this assessment. Organizations should independently verify affected versions, patch availability, and compatibility with their deployments. For authoritative guidance, consult the Open WebUI project repository and security advisories. This page does not constitute legal, compliance, or operational security advice. Source: NVD (public-domain), retrieved 2026-07-29. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-54013HIGHOpen WebUI Model Profile Image XSS – Account Takeover
- CVE-2016-20066HIGHWordPress CP Polls 1.0.8 Persistent XSS Vulnerability
- CVE-2016-20084HIGHWordPress Appointment-Booking-Calendar Unauthenticated XSS and Privilege Escalation
- CVE-2023-33999HIGHDOM-Based XSS in WP Mail Log Plugin – Analysis & Remediation
- CVE-2023-45795HIGHXSS in Pilz PASvisu Builder Component – Patch Guidance
- CVE-2023-45796HIGHStored XSS in Pilz PASvisu & PMI Industrial Software – Remediation Guide
- CVE-2023-54351HIGHStored XSS in WordPress Sonaar Music Plugin 4.7 – Patch & Detection Guide
- CVE-2025-11262HIGHLink Whisper Free Stored XSS Vulnerability – Analysis & Patch Guidance