CVE-2025-54881

Mermaid improperly sanitizes of sequence diagram labels leading to XSS

Published Aug 19, 2025 CVSS 4.0 · 5.3 Medium EPSS 1.1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-28574 Mermaid improperly sanitizes sequence diagram labels leading to XSS
Github GHSA Github GHSA GHSA-7rqq-prvp-x9jh Mermaid improperly sanitizes sequence diagram labels leading to XSS
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Mermaid improperly sanitizes of sequence diagram labels leading to XSS
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 5.3, 'vector': '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'}

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 19, 2025, 6:14 PM
Reserved
Jul 31, 2025, 5:23 PM
Status
Deferred
Published
Aug 19, 2025, 5:15 PM
Modified
Jun 17, 2026, 9:40 AM