CVE-2026-50159mermaid-js mermaid
Medium 5.3 No auth needed
Follow: this CVE · mermaid-js · mermaid-js mermaid We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 4.0
- 5.3
- EPSS
- —
- Auth required
- No
- Published
- Aug 6, 2026
- Updated
- Oct 24, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Prior to 10.9.8 and 11.16.1, Mermaid is vulnerable to CSS injection via sibling combinator selectors generated from diagram-supplied class or id names. An attacker who can supply diagram text can inject arbitrary CSS into the rendered page, potentially altering the appearance or behavior of unrelated page elements. This issue is fixed in versions 10.9.8 and 11.16.1.
What to do
- Apply the vendor's security update for mermaid.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | mermaid |
≥ 11.0.0-alpha.1 < 11.16.1 |
11.16.1 |
npm install mermaid@11.16.1 |
| npm | mermaid |
< 10.9.8 |
10.9.8 |
npm install mermaid@10.9.8 |
Per OSV / GitHub Advisories (GHSA-6x64-9x62-f2gx). Check the version in your lockfile before upgrading.
Affected products
- mermaid-js · mermaid
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.