CVE-2025-54881 Mermaid improperly sanitizes of sequence diagram labels leading to XSS
MediumCVSS 5.3
EPSS 0.86%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
Description
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.
Upgrade path
4 packages: 1 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/node-mermaid(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/node-mermaid(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| npm mermaid(npm) | >= 10.9.0-rc.1, < 10.9.4; >= 11.0.0-alpha.1, < 11.10.0 | 10.9.4, 11.10.0 | Fixed |
| mermaid-js mermaid | = >= 10.9.0-rc.1, <= 11.9.0 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm mermaid(npm) | >= 11.0.0-alpha.1, < 11.10.0 | 11.10.0 |
| npm mermaid(npm) | >= 10.9.0-rc.1, < 10.9.4 | 10.9.4 |
| mermaid-js mermaid | = >= 10.9.0-rc.1, <= 11.9.0 | No fix listed |
| ubuntu/node-mermaid(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/node-mermaid(Ubuntu:26.10) | All versions | No fix listed |
References
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/mermaid-js/mermaid/commit/5c69e5fdb004a6d0a2abe97e23d26e223a059832 patch
- https://github.com/mermaid-js/mermaid/commit/685516a85ec1df64cefd4fd15f26533be87d458e patch
- github.com
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- Debian Security Tracker CVE-2025-54881 vendor-advisory
- github.com product