Skip to content
HighVulnerability

GHSA-v8qj-hxv7-mgvv: Open WebUI: Stored XSS in Mermaid Markdown Preview

Published
Record updated
View JSON
Affected
  • open-webui <= 0.9.5
Fixed in
0.9.6
  • released June 1, 2026, 16 days before disclosure

Summary

Open WebUI renders Mermaid blocks from Markdown files in its file preview panel and inserts the generated SVG into the DOM using innerHTML. Because Mermaid is configured with securityLevel: 'loose', attacker-controlled Mermaid content executes JavaScript in the victim's browser under the application origin when a malicious .md file is opened in the preview panel. The issue is reproduced on v0.8.12 and affects main.

Mitigation

Use Mermaid's 'strict' securityLevel instead of 'loose', since Mermaid has DOMPurify built in.