{"cve":"CVE-2026-41149","nvd":{"published":"2026-05-22T23:16:53.750","modified":"2026-07-23T11:10:00.120","status":"Deferred","description":"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>.","cvss_v4":{"vector":"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","score":5.3},"cvss_v3":null,"cwes":["CWE-94"],"references":["https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056","https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3","https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr","https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:36:28.938604137+00:00"},"epss":{"cve":"CVE-2026-41149","score":0.00401,"percentile":0.34335,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-ghcm-xqfw-q4vr","url":"https://osv.dev/vulnerability/GHSA-ghcm-xqfw-q4vr","summary":"Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection","modified":"2026-09-10T03:51:05.683740817Z","packages":[{"ecosystem":"npm","name":"mermaid","purl":"pkg:npm/mermaid","ranges":[">=11.0.0-alpha.1 <11.15.0"],"fixed":["11.15.0"]},{"ecosystem":"npm","name":"mermaid","purl":"pkg:npm/mermaid","ranges":["<10.9.6"],"fixed":["10.9.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}