CVE-2026-50159
MEDIUM 5.3CVSS 4.0Mermaid allows CSS injection applying to sibling elements of the diagram
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.
- Published
- 6 Aug 2026
- Last modified
- 24 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-94
- Also known as
- GHSA-6x64-9x62-f2gx
- Sources
- NVDJSONOSV GHSA-6x64-9x62-f2gxJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.3 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | mermaid | >= 11.0.0-alpha.1, < 11.16.1 | 11.16.1 |
| OSV | npm | mermaid | < 10.9.8 | 10.9.8 |
References
- https://github.com/mermaid-js/mermaid/commit/12d472c9ed43f94814b110da8d7a9ae6dd5266ed · WEB
- https://github.com/mermaid-js/mermaid/commit/7e83f1533318b307764d961906a73377266f4c5e · WEB
- https://github.com/mermaid-js/mermaid/pull/8022 · WEB
- https://github.com/mermaid-js/mermaid/releases/tag/mermaid@11.16.1 · WEB
- https://github.com/mermaid-js/mermaid/releases/tag/v10.9.8 · WEB
- https://github.com/mermaid-js/mermaid/security/advisories/GHSA-6x64-9x62-f2gx · WEB
- https://github.com/mermaid-js/mermaid · PACKAGE
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 6 Aug 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 6 Aug 2026)