CVE Catalog

CVE-2026-41159

MediumCVSS 5.3
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.40%

32th percentile - higher than 32% of all known CVEs

Summary

Mermaid, a JavaScript diagramming tool, has a CSS injection vulnerability in its default configuration prior to versions 10.9.6 and 11.15.0. The fontFamily, themeCSS, and altFontFamily options allow injecting CSS that escapes the #mermaid-xxx scoping, enabling page defacement and DOM attribute exfiltration via :has() selectors.

Risk Assessment

An attacker can deface the page or exfiltrate DOM attributes (e.g., CSRF tokens) from other page elements, leading to confidentiality and integrity breaches.

Recommendation

Upgrade Mermaid to version 10.9.6 or 11.15.0, which contain the fix.

Other vulnerabilities in Mermaid

See all
Original NVD description (English source)

Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 and 11.15.0, Mermaid's default configuration allows injecting CSS that applies outside of the Mermaid diagram via the fontFamily, themeCSS, and altFontFamily configuration options. The injected CSS exploits stylis's & (scope reference) handling. :not(&) escapes the #mermaid-xxx automatic scoping, applying styles to all page elements. Global at-rules (@font-face, @keyframes, @counter-style) are also injectable as stylis hoists them to top level. This allows page defacement and DOM attribute exfiltration via CSS :has() selectors. This vulnerability is fixed in 10.9.6 and 11.15.0.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS