CVE-2025-54881: mermaid · Cross-site Scripting
Affects mermaidSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 56% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 19 Aug 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
AI-suggested
1. Immediate mitigation involves upgrading the mermaid-js library to a version beyond 11.9.0 once an official patch is released that addresses the XSS vulnerability. 2. Until a patch is available, organizations should sanitize or validate all user-supplied input used in sequence diagram labels to ensure no executable HTML or script content is included. 3. Employ Content Security Policy (CSP) headers to restrict script execution sources and reduce the impact of any injected scripts. 4. Review and restrict access to tools or platforms that allow users to input mermaid diagrams, implementing input filtering or approval workflows. 5. Educate users and developers about the risks of opening untrusted diagrams and encourage caution with links or files containing mermaid content. 6. Monitor web application logs and user activity for signs of attempted exploitation or unusual script execution. 7. Consider isolating or sandboxing rendering environments where mermaid diagrams are processed to limit potential damage from XSS. These steps go beyond generic advice by focusing on input validation, environment hardening, and user awareness specific to the mermaid-js context.
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.