CVE-2026-54011

Open WebUI: Stored XSS in Mermaid Markdown Preview

Published Jun 23, 2026 CVSS 3.1 · 8.7 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

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 a 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.

Affected Systems

The vulnerability affects the open‑webui:open‑webui product, specifically all releases earlier than 0.9.6. Users running any prior version of Open WebUI should be aware that the Mermaid Markdown preview component can execute arbitrary JavaScript supplied by a file owner or editor.

Risk and Exploitability

The flaw carries a CVSS score of 8.7, indicating high severity. No EPSS data is available, and the vulnerability is not listed in the CISA KEV catalog, but the exploitation path is straightforward: an attacker must supply a Markdown file containing crafted Mermaid content and then trigger its preview. Since the code executes in the context of the application, any user who views the preview will be affected, making the risk significant for shared or public deployments. The lack of server‑side sanitization and the use of innerHTML make the vulnerability highly exploitable for attackers with access to upload or edit files.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Open WebUI to version 0.9.6 or later to apply the vendor‑released fix that sets a safe security level for Mermaid rendering.
  • If an upgrade cannot be performed immediately, disable Mermaid rendering or remove Mermaid syntax from Markdown files to prevent execution of crafted content.
  • Restrict file upload and edit permissions to trusted users and consider implementing input validation or sanitization to strip disallowed scripts from user‑supplied files.

Generated by OpenCVE AI on June 24, 2026 at 10:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v8qj-hxv7-mgvv Open WebUI: Stored XSS in Mermaid Markdown Preview
History
Type Values Removed Values Added
First Time appeared Open-webui
Open-webui open-webui
Vendors & Products Open-webui
Open-webui open-webui
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Open WebUI: Stored XSS in Mermaid Markdown Preview
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 8.7, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N'}

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 5:55 PM
Reserved
Jun 11, 2026, 4:34 PM
Status
Analyzed
Published
Jun 23, 2026, 6:18 PM
Modified
Jun 25, 2026, 1:33 PM