Skip to main content
← All vulnerabilities
CVE-2026-26226GHSA-CGMM-X5WW-Q5CR

beautiful-mermaid < 0.1.3 SVG Attribute Injection

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.1.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

beautiful-mermaid versions prior to 0.1.3 contain an SVG attribute injection issue that can lead to cross-site scripting (XSS) when rendering attacker-controlled Mermaid diagrams. User-controlled values from Mermaid style and classDef directives are interpolated into SVG attribute values without proper escaping, allowing crafted input to break out of an attribute context and inject arbitrary SVG elements/attributes into the rendered output. When the generated SVG is embedded in a web page, this can result in script execution in the context of the embedding origin.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • beautiful-mermaid

    fixed in 0.1.3

  • beautiful-mermaidnpm

    fixed in 0.1.3

References 4

GitHub · lukilabs/beautiful-mermaid

neo.projectdiscovery.io

vulncheck.com