NVD Vulnerability Detail
Search Exploit, PoC
CVE-2026-41159
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, @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.

Publication Date May 30, 2026, 12:16 a.m.
Registration Date May 30, 2026, 4:15 a.m.
Last Update June 2, 2026, 3:38 a.m.
CVSS3.1 : MEDIUM
スコア 5.3
Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR) 不要
利用者の関与(UI) 不要
影響の想定範囲(S) 変更なし
機密性への影響(C) なし
完全性への影響(I) なし
可用性への影響(A)
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:mermaid_project:mermaid:*:*:*:*:*:node.js:*:* 10.9.6
cpe:2.3:a:mermaid_project:mermaid:*:*:*:*:*:node.js:*:* 11.0.0 11.15.0
Related information, measures and tools
Common Vulnerabilities List