# CVE-2026-50159: Mermaid allows CSS injection applying to sibling elements of the diagram

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.61%, higher than 50% of CVEs (2026-12-01)
- Published: 2026-08-06T19:55:27.994Z
- Modified: 2026-10-24T16:10:00.153Z
- Also known as: GHSA-6x64-9x62-f2gx
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- mermaid-js mermaid: < 10.9.8; >= 11.0.0-alpha.1, < 11.16.1
- mermaid (npm): from 11.0.0-alpha.1 before 11.16.1; before 10.9.8

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/mermaid-js/mermaid/security/advisories/GHSA-6x64-9x62-f2gx> (web)
- <https://github.com/mermaid-js/mermaid/pull/8022> (web)
- <https://github.com/mermaid-js/mermaid/commit/12d472c9ed43f94814b110da8d7a9ae6dd5266ed> (web)
- <https://github.com/mermaid-js/mermaid/commit/7e83f1533318b307764d961906a73377266f4c5e> (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> (package)

## Sources

- CVE List: [CVE-2026-50159](https://www.cve.org/CVERecord?id=CVE-2026-50159), CVE Terms of Use, modified 2026-08-07
- GitHub Advisory Database: [GHSA-6x64-9x62-f2gx](https://github.com/advisories/GHSA-6x64-9x62-f2gx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-50159](https://nvd.nist.gov/vuln/detail/CVE-2026-50159), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-50159 · Whole record: https://cve.day/CVE-2026-50159.json · Rebuilt by cve.day 2026-11-25T22:59:31.382Z
