Skip to content

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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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