- Home
- Vulnerabilities
- CVE-2026-26226
CVE-2026-26226
beautiful-mermaid < 0.1.3 SVG Attribute Injection
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))
| Product | Versions | Fixed in | Source |
|---|---|---|---|
| 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
- — CVE published (cve)
References
- https://github.com/lukilabs/beautiful-mermaid/pull/8issue-tracking, patch
- https://github.com/lukilabs/beautiful-mermaid/releases/tag/v0.1.3release-notes, patch
- https://neo.projectdiscovery.io/share/cec71dc7-a8eb-417e-b8b4-666644796c1etechnical-description, exploit
- https://www.vulncheck.com/advisories/beautiful-mermaid-svg-attribute-injectionthird-party-advisory
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)