CVE-2026-50159
published medium CVSS 4.0 · 5.3Mermaid allows CSS injection applying to sibling elements of the diagram
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| mermaid-js | — | mermaid< 10.9.8 · >= 11.0.0-alpha.1, < 11.16.1 | Affected | Not stated | GitHub_M |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| mermaid-js | mermaid | < 10.9.8 (affected)>= 11.0.0-alpha.1, < 11.16.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')
References
6- https://github.com/mermaid-js/mermaid/commit/12d472c9ed43f94814b110da8d7a9ae6dd5266ed
- https://github.com/mermaid-js/mermaid/commit/7e83f1533318b307764d961906a73377266f4c5e
- https://github.com/mermaid-js/mermaid/pull/8022
- https://github.com/mermaid-js/mermaid/releases/tag/[email protected]
- https://github.com/mermaid-js/mermaid/releases/tag/v10.9.8
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-6x64-9x62-f2gx
Provider assertions
2GitHub_M · cna
Mermaid allows CSS injection applying to sibling elements of the diagram
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 28f8615cda2dece90848219e667f8d1d87d714c27f849a6a21c969fc3e9f616b
- Ingested
- 23 Sep 2026, 09:18:57 UTC
- Source record
- Official CVE record