{"id":"CVE-2025-54881","published":"2025-08-19T17:04:29Z","modified":"2025-08-19T18:14:04Z","title":"Mermaid improperly sanitizes of sequence diagram labels leading to XSS","vendor":"mermaid-js","product":"mermaid","tier":"tail","description":{"text":"Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. In the default configuration of mermaid 10.9.0-rc.1 to 11.9.0, user supplied input for sequence diagram labels is passed to innerHTML during calculation of element size, causing XSS.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00926,"percentile":0.61344,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mermaid-js/mermaid/commit/5c69e5fdb004a6d0a2abe97e23d26e223a059832","tags":["x_refsource_MISC"]},{"url":"https://github.com/mermaid-js/mermaid/commit/685516a85ec1df64cefd4fd15f26533be87d458e","tags":["x_refsource_MISC"]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":12.27},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"mermaid-js","affectedVersions":[{"vendor":"mermaid-js","product":"mermaid","versions":[">= 10.9.0-rc.1, <= 11.9.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-08-19T18:10:57.336912Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"mermaid","vulnerableRanges":[">=11.0.0-alpha.1, <11.10.0",">=10.9.0-rc.1, <10.9.4"],"patched":["11.10.0","10.9.4"],"from":["GHSA-7rqq-prvp-x9jh"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-28574","exploited":false,"provenance":"source"}}