1. Home
  2. Vulnerabilities
  3. CVE-2026-26226

CVE-2026-26226

beautiful-mermaid < 0.1.3 SVG Attribute Injection

Published 13 Feb 2026 · modified 8 Nov 2026 · Sources: NVD, CNA (vendor or assigner), EPSS (FIRST)

Medium 41/100

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.

Affected products and versions

lukilabs (1 line(s))
lukilabs
ProductVersionsFixed inSource
beautiful-mermaid before 0.1.3 (excluded) — CNA (vendor or assigner)

Fix

Not provided by the vendor.

Workaround

No workaround provided.

Check whether you are affected

Exploit reported by sources

These links are tagged “exploit” by the NVD or CVE.org. We have neither verified nor copied them; open with care.

Timeline

  1. — CVE published (cve)

References

Data provenance

Status
NVD
Publication date
NVD
Description
CNA (vendor or assigner)
CVSS score
CNA (vendor or assigner)
Weakness (CWE)
CNA (vendor or assigner)
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N (CVSS 4.0, CNA:VulnCheck)
Weakness
CWE-79 · Script intersite (XSS)

How this data is obtained and calculated