CVE-2025-54881CWE-79

Mermaid improperly sanitizes of sequence diagram labels leading to XSS

Medium · published August 19, 2025

CVSS v4.0
5.3
EPSS
1%
Percentile
56.1
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
5.3 · MEDIUM
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
EPSS
0.00799 · 56.1th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2025-08-19T17:04Z
EPSS history
Timeline
  • 19 AUG 17:04Z
    Mermaid improperly sanitizes of sequence diagram labels leading to XSS
    cvelistv5