beautiful-mermaid < 0.1.3 SVG Attribute Injection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| lukilabs | beautiful-mermaid | before 0.1.3 | 0.1.3 | Patch available | CNA |
| — | beautiful-mermaid (npm) | before 0.1.3 | 0.1.3 | Patch available | GHSA-cgmm-x5ww-q5cr |
- beautiful-mermaid Vendorlukilabs Affected before 0.1.3 Fixed in 0.1.3 Patch available CNA
- beautiful-mermaid (npm) Vendor— Affected before 0.1.3 Fixed in 0.1.3 Patch available GHSA-cgmm-x5ww-q5cr
Remediation
- Fix · CNA beautiful-mermaid (lukilabs) Fixed in 0.1.3
- Fix · GHSA-cgmm-x5ww-q5cr beautiful-mermaid (npm) Fixed in 0.1.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-26226
- 2026-10-03 Alias added: GHSA-cgmm-x5ww-q5cr
- 2026-10-25 EPSS moved to the below the 50th percentile
References
Sources
- CVE-2026-26226 · CVE Program
- CVE-2026-26226 · NVD
- FIRST EPSS
- GHSA-cgmm-x5ww-q5cr · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences