Skip to main content

Open WebUI CVE-2026-54011

| EUVDEUVD-2026-38531 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-17 https://github.com/open-webui/open-webui GHSA-v8qj-hxv7-mgvv
5.4
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to Open WebUI
  2. Delivery
    Upload malicious Markdown with Mermaid click directive
  3. Exploit
    Lure victim to open file preview
  4. Execution
    Victim clicks rendered diagram node
  5. Persist
    javascript: URI fires under app origin
  6. Impact
    Steal session or perform CSRF actions

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires (1) an Open WebUI instance running a vulnerable version (≤ 0.9.5) where Mermaid is initialized with securityLevel:'loose', (2) an attacker holding low-privileged credentials sufficient to start a chat and upload files with Code Interpreter enabled, (3) a victim user who subsequently opens the malicious .md attachment in the file preview panel AND clicks the rendered Mermaid node containing the javascript: href, and (4) absence of a restrictive Content Security Policy blocking javascript: URIs. Exploitation is limited by the required victim interaction (UI:R - both opening the preview and clicking the diagram element), the need for an authenticated upload session, and the fact that single-tenant or solo deployments offer no cross-user victim to target.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N reflects a network-reachable, low-complexity attack that requires a low-privileged uploader and a victim interaction (opening the file and clicking the diagram), with a scope change because script runs in the victim's browser under the Open WebUI origin rather than the uploader's session. EPSS, KEV, and SSVC data were not provided, so probabilistic exploitation likelihood and automatability cannot be quantified, but a working PoC is published in the GHSA advisory, making exploitation trivially reproducible in any unpatched deployment that allows file uploads. Real-world risk is meaningful in multi-tenant Open WebUI instances (shared workspaces, hosted deployments) where a low-privileged attacker can target admins or other users; in single-user/local-only deployments the practical risk is lower. The 8.7 score is consistent with the scope-changed XSS impact, though UI:R and PR:L should temper urgency relative to a pre-auth RCE.

Exploit ScenarioDerived

An attacker with a low-privileged Open WebUI account creates a chat, enables Code Interpreter, and uploads a .md file containing a Mermaid flowchart whose click directive points to a javascript: URI; the file persists in the workspace. When an administrator or another user opens the file preview and clicks the rendered node, arbitrary JavaScript executes in their browser under the Open WebUI origin, enabling session token theft, CSRF against admin endpoints, or pivot into account takeover. A working PoC payload is published in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 18, 2026

Stored cross-site scripting in Open WebUI up to and including v0.9.5 allows authenticated users to execute arbitrary JavaScript in another user's browser under the application origin by uploading a malicious Markdown file containing a crafted Mermaid diagram. The flaw stems from Mermaid being initialized with securityLevel:'loose' and its SVG output being injected via innerHTML in the file preview panel. Publicly available exploit code exists in the GHSA advisory, but there is no public exploit identified at time of analysis beyond the PoC, and the issue is not listed in CISA KEV.

RemediationAI

Upgrade Open WebUI to version 0.9.6 or later (Vendor-released patch: 0.9.6), available via pip install --upgrade open-webui and tracked at https://github.com/open-webui/open-webui/security/advisories/GHSA-v8qj-hxv7-mgvv; the underlying fix changes Mermaid initialization from securityLevel:'loose' to 'strict' so Mermaid's built-in DOMPurify sanitizes output. Where immediate patching is not possible, restrict Markdown/file uploads to trusted users, disable the Code Interpreter file-preview feature, or front the application with a Content Security Policy that forbids inline event handlers and javascript: URIs - noting that a strict CSP may break other Open WebUI rendering features and that limiting uploads reduces collaborative functionality.

Affected VersionsENISA

open-webui < 0.9.6

Affected Packages

pypi open-webui fix: 0.9.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Open WebUI (pip package open-webui) is a self-hosted web interface for LLMs written in Svelte/TypeScript. It uses the Mermaid diagram library to render flowcharts embedded in Markdown via fenced `mermaid code blocks. In src/lib/utils/index.ts the application calls mermaid.initialize with securityLevel:'loose', which disables Mermaid's built-in DOMPurify sanitization and permits javascript: URIs in click directives. The rendered SVG is then inserted into the DOM with innerHTML in src/lib/components/chat/FileNav/FilePreview.svelte, propagating the unsafe link into a live, clickable element under the Open WebUI origin. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation), specifically a sink-side trust failure where attacker-controlled diagram syntax is treated as trusted markup.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/open-webui/open-webui) PRIMARY HIGH
NVD 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 8.7 HIGH

Network-reachable upload requires a low-privileged account (PR:L) and victim click (UI:R); script runs under app origin affecting another user (S:C) with high C/I impact and no availability effect.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N

Primary rating from Vendor (https://github.com/open-webui/open-webui).

CVSS VectorNVD

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

Lifecycle Timeline

2
Severity Changed
Jun 25, 2026 - 13:52 NVD
HIGH MEDIUM
CVSS changed
Jun 25, 2026 - 13:52 NVD
8.7 (HIGH) 5.4 (MEDIUM)

DescriptionNVD

Summary

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 is a confirmed stored XSS vulnerability reachable through normal product functionality.

Affected Version

  • main
  • Reproduced on v0.8.12

Affected Code

Mermaid is initialized in permissive mode:

https://github.com/open-webui/open-webui/blob/9bd84258d09eefe7bf975878fb0e31a5dadfe0f8/src/lib/utils/index.ts#L1698 The file preview path renders Mermaid output and injects the returned SVG into the DOM:

https://github.com/open-webui/open-webui/blob/9bd84258d09eefe7bf975878fb0e31a5dadfe0f8/src/lib/components/chat/FileNav/FilePreview.svelte#L133

Impact

A successful exploit allows JavaScript execution in the victim’s browser under the Open WebUI origin when a malicious Markdown file is opened in the preview panel.

PoC

A malicious .md file containing the follwowing contents can be used to trigger the bug:

`

flowchart LR A[click me] click A href "javascript:alert(document.domain)" "x"

Steps to reproduce: 1- Create a new chat 2- Enable Code Interpreter and browse and upload the file with .md extension. <img width="331" height="258" alt="image" src="https://github.com/user-attachments/assets/bce2b754-56d1-4da1-90a9-22bcb93269f2" /> 3- Clicking on the file, and clicking click me should pop an alert <img width="1103" height="485" alt="image" src="https://github.com/user-attachments/assets/18754486-799b-434e-a2fc-dd7c09956a29" />

Remediation

Since mermaid has DOMPurify as a built-in, it is recommended to use the strict mode instead of loose.

Executive ViewAI

Why It Matters

Open WebUI versions 0.9.5 and earlier contain a stored cross-site scripting vulnerability with publicly available exploit code. Authenticated users can inject malicious code into file previews to execute arbitrary JavaScript in colleagues' browsers, enabling session hijacking, credential theft, and unauthorized access to shared resources. Organizations using affected versions face immediate compromise risk.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) disable Markdown file uploads or restrict to administrative users only; (2) disable Mermaid diagram rendering in file preview functionality; (3) implement strict Content Security Policy headers to block inline script execution; (4) enforce comprehensive file content validation and sanitization; (5) disable file preview feature entirely until patch confirmation.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Threat Intel
1
1 sources
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy