CVE-2026-26226 Details
Description
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.
A vulnerability in beautiful-mermaid versions prior to 0.1.3 allows for SVG attribute injection, which can lead to cross-site scripting (XSS) when rendering attacker-controlled Mermaid diagrams. The issue arises because user-controlled values from Mermaid style and classDef directives are inserted into SVG attribute values without proper escaping. This flaw enables crafted input to escape the attribute context and inject arbitrary SVG elements or attributes into the rendered output. When the generated SVG is embedded in a web page, it can execute scripts in the context of the embedding origin.
Users can upgrade to beautiful-mermaid version 0.1.3 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Feb 13, 2026CISA-ADP
Assessed Feb 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/lukilabs/beautiful-mermaid/pull/8 | [email protected] | Issue TrackingVendor |
| https://github.com/lukilabs/beautiful-mermaid/releases/tag/v0.1.3 | [email protected] | Release NotesVendor |
| https://neo.projectdiscovery.io/share/cec71dc7-a8eb-417e-b8b4-666644796c1e | [email protected] | ExploitTechnical Description |
| https://www.vulncheck.com/advisories/beautiful-mermaid-svg-attribute-injection | [email protected] | Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| lukilabs beautiful-mermaid | All versions |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 8, 2026 | CVE Modified | [email protected] |
| Jul 14, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 13, 2026 | New CVE Received | [email protected] |
Volerion