CVE-2025-54881
MEDIUM 5.3CVSS 4.0Mermaid improperly sanitizes sequence diagram labels leading to XSS
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.
- Published
- 19 Aug 2025
- Last modified
- 7 Aug 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-79
- Also known as
- GHSA-7rqq-prvp-x9jh
- Sources
- NVDJSONOSV GHSA-7rqq-prvp-x9jhJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.3 | 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/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 |
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | mermaid | >= 11.0.0-alpha.1, < 11.10.0 | 11.10.0 |
| OSV | npm | mermaid | >= 10.9.0-rc.1, < 10.9.4 | 10.9.4 |
References
- https://github.com/mermaid-js/mermaid/commit/5c69e5fdb004a6d0a2abe97e23d26e223a059832 · WEB
- https://github.com/mermaid-js/mermaid/commit/685516a85ec1df64cefd4fd15f26533be87d458e · WEB
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-54881 · ADVISORY
- https://github.com/mermaid-js/mermaid · PACKAGE
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 19 Aug 2025)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 19 Aug 2025)