{"id":"EUVD-2026-31520","enisaUuid":"454f1e3c-5ae7-371b-974b-24d45fc7f8e7","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, \u003cscript\u003e 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 \u003ciframe\u003e.","datePublished":"May 22, 2026, 10:34:36 PM","dateUpdated":"May 23, 2026, 3:22:44 AM","baseScore":5.3,"baseScoreVersion":"4.0","baseScoreVector":"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","references":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr\nhttps://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056\nhttps://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3\n","aliases":"CVE-2026-41149\nGHSA-ghcm-xqfw-q4vr\n","assigner":"GitHub_M","epss":0.4,"enisaIdProduct":[{"id":"15309021-5d0b-3420-99a0-c0917cc55182","product":{"name":"mermaid","vendor":{"name":"mermaid-js"}},"product_version":"\u003c 10.9.6"},{"id":"d0a6dc34-2cb8-3380-ac0e-be7c09dc252f","product":{"name":"mermaid","vendor":{"name":"mermaid-js"}},"product_version":"11.0.0-alpha.1, \u003c 11.15.0"}],"enisaIdVendor":[{"id":"d677fe81-7e97-39e9-93fe-1f3a683b09d7","vendor":{"name":"mermaid-js"}}],"enisaIdVulnerability":[{"id":"11383097-caaa-317c-8cbe-1bdc1e3eff1e","vulnerability":{"id":"GHSA-ghcm-xqfw-q4vr","description":"Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection","datePublished":"May 11, 2026, 7:36:46 PM","dateUpdated":"Jun 8, 2026, 11:21:04 PM","baseScore":0.0,"references":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-41149\nhttps://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056\nhttps://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3\nhttps://github.com/mermaid-js/mermaid\nhttps://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.15.0\nhttps://github.com/mermaid-js/mermaid/releases/tag/v10.9.6\nhttps://mermaid.js.org/config/schema-docs/config.html#securitylevel\n","enisa_id":"EUVD-2026-31520\n","aliases":"GHSA-ghcm-xqfw-q4vr\nCVE-2026-41149\n","epss":0.0,"dataProcessed":"Nov 9, 2026, 3:47:46 PM","vulnerabilityProduct":[],"vulnerabilityVendor":[]}},{"id":"e909da6d-8df0-366b-90a3-8be2ec0483c7","vulnerability":{"id":"CVE-2026-41149","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, \u003cscript\u003e 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 \u003ciframe\u003e.","datePublished":"May 22, 2026, 10:34:36 PM","dateUpdated":"May 23, 2026, 3:22:44 AM","status":"PUBLISHED","baseScore":5.3,"baseScoreVersion":"4.0","baseScoreVector":"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","references":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr\nhttps://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056\nhttps://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3\n","enisa_id":"EUVD-2026-31520\n","assigner":"GitHub_M","epss":0.4,"dataProcessed":"Nov 13, 2026, 7:20:43 AM","vulnerabilityProduct":[{"id":"42ac6c00-a3b0-31bd-a6db-1aff79b102b7","product":{"name":"mermaid","vendor":{"name":"mermaid-js"}},"product_version":"11.0.0-alpha.1, \u003c 11.15.0"},{"id":"e9d13a28-0b2b-3f41-a688-bc8eac9deeee","product":{"name":"mermaid","vendor":{"name":"mermaid-js"}},"product_version":"\u003c 10.9.6"}],"vulnerabilityVendor":[{"id":"77427172-ad19-395e-9ca0-aa7340449d91","vendor":{"name":"mermaid-js"}}]}}],"enisaIdAdvisory":[]}