{"id":"EUVD-2026-31520","revision":null,"records":[{"revision":"5aba2dfc5b2e47c6b53aad8c9706fed7","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-41149","aliases":[],"title":"Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection","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>.","state":0,"publishedAt":"2026-05-22T22:34:36.944+00:00","modifiedAt":"2026-05-23T03:22:44.013+00:00","affected":[{"ecosystem":"Vendor product","name":"mermaid","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"mermaid-js\",\n                    \"product\": \"mermaid\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 11.0.0-alpha.1, < 11.15.0\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"< 10.9.6\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","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,"severity":"MEDIUM"}],"references":["https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr","https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056","https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-41149","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-41149","identifiers":["CVE-2026-41149"]},"retained":false,"historicalAffected":[]},{"revision":"b3810fd6fbe74d938164bb1b515bc003","observedAt":"2026-11-15T12:03:07.559+00:00","statement":{"source":"euvd","id":"EUVD-2026-31520","aliases":["CVE-2026-41149","GHSA-ghcm-xqfw-q4vr"],"title":"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…","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>.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","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,"severity":null}],"references":["https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr","https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056","https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-31520","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"May 22, 2026, 10:34:36 PM","dateUpdated":"May 23, 2026, 3:22:44 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-31520","identifiers":["EUVD-2026-31520","CVE-2026-41149","GHSA-ghcm-xqfw-q4vr"]},"retained":false,"historicalAffected":[]},{"revision":"3c960a2541224328b84a9eb194282699","observedAt":"2026-10-25T09:17:30.114+00:00","statement":{"source":"nvd","id":"CVE-2026-41149","aliases":[],"title":"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…","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>.","state":0,"publishedAt":"2026-05-22T23:16:53.75+00:00","modifiedAt":"2026-07-23T11:10:00.12+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","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/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","score":5.3,"severity":"MEDIUM"}],"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"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-41149","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-94"],"productCriteria":[],"sourceDates":{"published":"2026-05-22T23:16:53.750","lastModified":"2026-07-23T11:10:00.120"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-41149","identifiers":["CVE-2026-41149"]},"retained":false,"historicalAffected":[]},{"revision":"1f4f72899ef9487e8652b3e0d6283274","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-ghcm-xqfw-q4vr","aliases":["CVE-2026-41149"],"title":"Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection","description":"### Impact\n\nUnder the default configuration, Mermaid state diagram's `classDef` allow DOM injection that escapes the SVG, although `<script>` tags are removed, preventing XSS.\n\n#### Proof-of-concept\n\n```\nstateDiagram-v2\n  classDef xss fill:red</style></svg><style>*{x:x;y:y;overflow:visible!important;contain:none!important;transform:none!important;filter:none!important;clip-path:none!important}</style><div style=\"x:x;y:y;color:red;font:5em/1 monospace;display:grid;place-items:center;z-index:2147483647;width:100vw;height:100vh;position:fixed;top:0;left:0;background:black\">HACKED</div><svg><style>a:b\n  [*] --> A:::xss\n```\n\n### Patches\n\n- [v11.15.0](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.15.0) (see [37ff937f1da2e19f882fd1db01235db4d01f4056](https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056))\n- [v10.9.6](https://github.com/mermaid-js/mermaid/releases/tag/v10.9.6) (see [4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3](https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3))\n\n### Workarounds\n\nIf you can not update to a patched version, setting [`\"securityLevel\": \"sandbox\"`](https://mermaid.js.org/config/schema-docs/config.html#securitylevel)  will prevent this, by rendering the mermaid diagram in a sandboxed `<iframe>`.\n\n### Credits\n\nThanks to @zsxsoft from @KeenSecurityLab for reporting this vulnerability.","state":0,"publishedAt":"2026-05-11T19:36:46+00:00","modifiedAt":"2026-09-10T03:51:05.6837408+00:00","affected":[{"ecosystem":"npm","name":"mermaid","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0-alpha.1"},{"kind":"fixed","version":"11.15.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"mermaid","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"10.9.6"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"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":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr","https://nvd.nist.gov/vuln/detail/CVE-2026-41149","https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056","https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3","https://github.com/mermaid-js/mermaid","https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.15.0","https://github.com/mermaid-js/mermaid/releases/tag/v10.9.6","https://mermaid.js.org/config/schema-docs/config.html#securitylevel"],"sourceUrl":"https://github.com/advisories/GHSA-ghcm-xqfw-q4vr","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-ghcm-xqfw-q4vr","identifiers":["GHSA-ghcm-xqfw-q4vr","CVE-2026-41149"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-15T17:43:57.7477261+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-15T17:43:57.7477261+00:00","lastSuccessAt":"2026-11-15T17:43:57.9319367+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:57.9319376+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-7de4d7559a5263003f03d9f70577ab06f92ba4178309f26fce53e22a4a959294-85332baa2a2fe51044c7b11e74168cdf9ea3251563b394940fa4249a4ab5eea5","complete":true,"records":425838,"lastAttemptAt":"2026-11-15T17:43:56.7045831+00:00","lastSuccessAt":"2026-11-15T17:43:56.6887608+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:56.7045831+00:00","snapshotPublishedAt":"2026-11-15T17:26:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-b236bb13999347ce987e1ca186c5d1f1","complete":false,"records":13821,"lastAttemptAt":"2026-11-15T17:54:40.0701718+00:00","lastSuccessAt":"2026-11-15T17:54:40.063+00:00","error":"54 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-15T17:54:40.063+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13820,"expectedIdentifiers":13874,"failedIdentifiers":54},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-15T17:43:57.7477261+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-15T17:43:57.7477261+00:00","lastSuccessAt":"2026-11-15T17:43:57.9327717+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:57.9327718+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-31b467d979fb43bea77e4ea73320cf71","complete":true,"records":13833,"lastAttemptAt":"2026-11-15T17:44:08.5219832+00:00","lastSuccessAt":"2026-11-15T17:44:08.513+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:44:08.513+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13874,"expectedIdentifiers":13874,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-15T17:43:57.6786653+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:57.6786653+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-15T17:43:57.373573+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:57.373573+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-15T17:43:57.6970901+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:57.6970901+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-ff18f36f13fcca3a20a3fb9274b59b8872d18869a99071730e1e79b625c8f612","complete":true,"records":232475,"lastAttemptAt":"2026-11-15T17:43:57.5611113+00:00","lastSuccessAt":"2026-11-15T11:05:10.4195883+00:00","error":null,"lastVerifiedAt":"2026-11-15T17:43:57.5611113+00:00","snapshotPublishedAt":"2026-11-15T10:33:06+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}