Vulnerability
CVE-2026-41149
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and earlier, as well as 11.0.0-alpha.1 through 11.14.0, are vulnerable to HTML injection under the default configuration. Specifically, the classDef directive in Mermaid state diagrams permits DOM injection that escapes the SVG context. However, <script> tags are stripped, which prevents cross-site scripting (XSS). This issue has been fixed in versions 10.9.6 and 11.15.0. If developers are unable to immediately upgrade, they can work around this issue by setting "securityLevel": "sandbox", which prevents the issue by rendering the mermaid diagram in a sandboxed <iframe>.
61 advisories report this vulnerability, across 4 ecosystems.
Advisories
- CGA-3j6g-mgxw-cr6f
- CGA-47r7-9w7j-699c
- CGA-4fjw-hm9r-mm6c
- CGA-4q47-vrh6-fg59
- CGA-4rpc-xrgm-4xj6
- CGA-535w-qc53-7q66
- CGA-54fj-wx6p-w76h
- CGA-576w-j4m3-w7x6
- CGA-58v5-qx4x-p672
- CGA-5f3c-3g98-vw3r
- CGA-5qv6-9xq7-p7qx
- CGA-6296-7vfg-2m73
- CGA-6m7f-88pf-2vrv
- CGA-6wpw-mjwg-frpx
- CGA-6xgv-gmcj-86qv
- CGA-73hv-6xcr-2fr5
- CGA-74wr-x6j2-58h2
- CGA-796g-x92p-gw8p
- CGA-7g99-wp64-9jp5
- CGA-8vj9-3xpx-cvj7
- CGA-8w6g-7v59-25xw
- CGA-8w97-x36g-4m52
- CGA-9p4r-p959-m8pp
- CGA-c72m-65vc-wj59
- CGA-cxcm-r733-44rh
- CGA-f3xh-xp9x-fvw8
- CGA-f6xw-49gh-3g22
- CGA-f9ww-rx8m-rq6r
- CGA-fcvr-7x3w-8c84
- CGA-frg7-j9wg-cmq6
- CGA-g53c-g9hw-v8rm
- CGA-ggr5-x7xf-grfj
- CGA-gjcp-j6px-mfr2
- CGA-h8qw-4wcj-9fv4
- CGA-hq9g-v7j4-654g
- CGA-j33m-hp9j-mq8r
- CGA-jcmf-8vm3-q75x
- CGA-jfjj-4j8x-xm5p
- CGA-jg4p-vvm5-jwrq
- CGA-jjg4-mxrm-qm5w
- CGA-jvv6-52xh-x92g
- CGA-jxhh-m6cj-c8pr
- CGA-pmqc-fq94-v8qh
- CGA-q7x6-qr57-43g4
- CGA-qjmx-5wc2-xj89
- CGA-qwjp-7mgr-9g83
- CGA-r4p9-x64p-3qrq
- CGA-r646-2fgg-mg8v
- CGA-v4qq-3xrv-9h3v
- CGA-v9qv-w53w-qxh5
- CGA-wfg8-m76c-78q6
- CGA-wq7m-988g-h5cc
- CGA-wqwc-f84j-x8gg
- CGA-x3qh-2g5c-94c2
- CGA-xgh7-cp88-wrmg
- CGA-xgw8-7994-9w44
- CGA-xmqr-6hxm-r773
- CGA-xxq8-jx7x-5r29
-
DEBIAN-CVE-2026-41149
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and earlier, as well as 11.0.0-alpha.1 through 11.14.0, are vulnerable to HTML injection under the…
-
GHSA-ghcm-xqfw-q4vr
Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection
-
UBUNTU-CVE-2026-41149
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and earlier, as well as 11.0.0-alpha.1 through 11.14.0, are vulnerable to HTML injection under the…