CVEFinder.io

CVE-2026-41159

🔶 medium
Summary

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, @c

Description

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.

CVSS Score
5.3
Medium
EPSS Score
0.4
Exploit Probability
Published Date
2026-05-29
First Seen: 2026-05-30
📊 Relative Risk Intelligence

This CVE is Lower Risk - more severe than 18.9% of all 378,614 vulnerabilities in our database.

#307,233
Below average severity
Severity Percentile
🎯 CISA SSVC Assessment Updated: May 29, 2026
🔍 Exploitation Status
None
No known exploits
⚙️ Automatable
NO
Requires human interaction
💥 Technical Impact
Partial
Limited system impact
SSVC data provided by CISA
Last Modified 2026-07-21
Source NVD 🔗
CVSS Vector 3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS Vector 4.0 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CWE IDs (Weakness Types)

📦 Affected Products 2

🔗 References 5

🔗 Related CVEs 5

CVE ID Severity CVSS EPSS Summary Published
CVE-2026-41150 🔶 medium 5.3 0.4 Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.6 ... 2026-05-29
CVE-2025-54880 🔶 medium 6.1 0.0 Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer ... 2025-08-19
CVE-2022-31108 🔶 medium 4.1 0.2 Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer ... 2022-06-28
CVE-2021-43861 ⚠️ high 7.2 0.5 Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer ... 2021-12-30
CVE-2021-35513 🔶 medium 6.1 0.3 Mermaid before 8.11.0 allows XSS when the antiscript feature is used. 2021-06-27
These CVEs affect the same products