{"id":"CVE-2026-26226","published":"2026-02-13T16:35:06Z","modified":"2026-11-08T14:01:33Z","title":"beautiful-mermaid < 0.1.3 SVG Attribute Injection","vendor":"lukilabs","product":"beautiful-mermaid","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00801,"percentile":0.53428,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/lukilabs/beautiful-mermaid/releases/tag/v0.1.3","tags":["release-notes","patch"]},{"url":"https://github.com/lukilabs/beautiful-mermaid/pull/8","tags":["issue-tracking","patch"]},{"url":"https://neo.projectdiscovery.io/share/cec71dc7-a8eb-417e-b8b4-666644796c1e","tags":["technical-description","exploit"]},{"url":"https://www.vulncheck.com/advisories/beautiful-mermaid-svg-attribute-injection","tags":["third-party-advisory"]}],"priority":{"score":19.4,"factors":[{"name":"EPSS percentile","points":10.69},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"lukilabs","affectedVersions":[{"vendor":"lukilabs","product":"beautiful-mermaid","versions":["< 0.1.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-02-13T16:57:59.724462Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"beautiful-mermaid","vulnerableRanges":["<0.1.3"],"patched":["0.1.3"],"from":["GHSA-cgmm-x5ww-q5cr"],"provenance":"source"}],"summary":{"text":"beautiful-mermaid versions before 0.1.3 contain an SVG attribute injection flaw in the Mermaid rendering component, where values from style and classDef directives are inserted into SVG attributes without escaping. An attacker who can supply a crafted Mermaid diagram can break out of the attribute context to inject arbitrary SVG elements and attributes, leading to script execution in the embedding page's origin if the attacker needs a victim to view the rendered output (user interaction, no authentication, network access only).","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:38:27Z"},"euvd":{"id":"EUVD-2026-7382","exploited":false,"provenance":"source"},"exploitRefs":["https://neo.projectdiscovery.io/share/cec71dc7-a8eb-417e-b8b4-666644796c1e"]}