Read the docs
TI-2025-34615 Aliases CVE-2025-54881GHSA-7rqq-prvp-x9jh

Mermaid improperly sanitizes of sequence diagram labels leading to XSS

Priority MEDIUM 63CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
None
Impact type
Cross-site scripting
Confidentiality · integrity · availability
None · None · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00799 56th percentileScored 2026-11-07
Fix Fixed mermaid (npm): 11.10.0, 10.9.4

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
mermaid-jsmermaid10.9.0-rc.1 – 11.9.0—No fix listedCNA
—mermaid (npm)11.0.0-alpha.1 to before 11.10.011.10.0Patch availableGHSA-7rqq-prvp-x9jh
—mermaid (npm)10.9.0-rc.1 to before 10.9.410.9.4Patch availableGHSA-7rqq-prvp-x9jh
  • mermaid Vendormermaid-js Affected 10.9.0-rc.1 – 11.9.0 Fixed in — No fix listed CNA
  • mermaid (npm) Vendor— Affected 11.0.0-alpha.1 to before 11.10.0 Fixed in 11.10.0 Patch available GHSA-7rqq-prvp-x9jh
  • mermaid (npm) Vendor— Affected 10.9.0-rc.1 to before 10.9.4 Fixed in 10.9.4 Patch available GHSA-7rqq-prvp-x9jh

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:mermaid_project:mermaid:*:*:*:*:*:*:*:*——mermaid-js
  • cpe:2.3:a:mermaid_project:mermaid:*:*:*:*:*:*:*:* Versions — — ·mermaid-js

Remediation

  • Fix · GHSA-7rqq-prvp-x9jh mermaid (npm) Fixed in 11.10.0 Advisory →
  • Fix · GHSA-7rqq-prvp-x9jh mermaid (npm) Fixed in 10.9.4 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-54881
  2. 2026-10-03 Alias added: GHSA-7rqq-prvp-x9jh

References

  • TI-2026-29778 Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS CVSS 4.0MEDIUM 5.3
  • TI-2026-50057 Mermaid Architecture diagrams are vulnerable to prototype pollution CVSS 4.0MEDIUM 6.5
  • TI-2022-13152 Arbitrary `CSS` injection into the generated graph affecting the container HTML in mermaid.js CVSS 3.1MEDIUM 6.1
  • TI-2024-25762 Cross-site Scripting in ZenUML CVSS 3.1MEDIUM 5.4
  • TI-2026-29777 Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection CVSS 4.0MEDIUM 5.3
  • TI-2025-34614 Mermaid does not properly sanitize architecture diagram iconText leading to XSS CVSS 4.0MEDIUM 5.1
See all 14 →

Sources