Vulnerability · Published Aug 19, 2025 · Assigned by GitHub_M
CVE-2025-54880Mermaid does not properly sanitize architecture diagram iconText leading to XSS
Medium 5.1
In plain English
A medium-severity cross-site scripting in mermaid from mermaid-js. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 11.9.0 and earlier, user supplied input for architecture diagram icons is passed to the d3 html() method, creating a sink for cross site scripting. This vulnerability is fixed in 11.10.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu:22.04:LTS | node-mermaid | no fix listed | UBUNTU-CVE-2025-54880 |
| Ubuntu:26.10 | node-mermaid | no fix listed | UBUNTU-CVE-2025-54880 |
| npm | mermaid | 11.10.0 | GHSA-8gwm-58g9-j8pw |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| mermaid-js | mermaid | >= 11.1.0, < 11.10.0 |
Weakness: CWE-79 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
References
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw x_refsource_CONFIRM
- https://github.com/mermaid-js/mermaid/commit/2aa83302795183ea5c65caec3da1edd6cb4791fc x_refsource_MISC
- https://github.com/mermaid-js/mermaid/commit/734bde38777c9190a5a72e96421c83424442d4e4 x_refsource_MISC