{"id":"CVE-2026-50159","title":"Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts","summary":"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 …","severity":"medium","cwe":["CWE-94"],"vendor":"mermaid","product":"mermaid","affected":["mermaid >= 11.0.0-alpha.1, < 11.16.1","mermaid < 10.9.8"],"patched":["mermaid 11.16.1","mermaid 10.9.8"],"published":"2026-08-06","updated":"2026-09-08","sourceUpdated":"2026-09-08T20:53:06.753","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-50159","references":[{"url":"https://github.com/mermaid-js/mermaid/commit/12d472c9ed43f94814b110da8d7a9ae6dd5266ed","label":"security-advisories@github.com"},{"url":"https://github.com/mermaid-js/mermaid/commit/7e83f1533318b307764d961906a73377266f4c5e","label":"security-advisories@github.com"},{"url":"https://github.com/mermaid-js/mermaid/pull/8022","label":"security-advisories@github.com"},{"url":"https://github.com/mermaid-js/mermaid/releases/tag/mermaid@11.16.1","label":"security-advisories@github.com"},{"url":"https://github.com/mermaid-js/mermaid/releases/tag/v10.9.8","label":"security-advisories@github.com"},{"url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-6x64-9x62-f2gx","label":"security-advisories@github.com"},{"url":"https://github.com/advisories/GHSA-6x64-9x62-f2gx"}],"tags":["nvd","ghsa","npm"],"epss":0.00609,"epssPercentile":0.47836,"aliases":["GHSA-6x64-9x62-f2gx"],"ecosystem":"npm","ingestedAt":"2026-08-06T20:03:56.388Z","slug":"CVE-2026-50159","body":"## Overview\n\nMermaid 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.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.\n\n## Package advisory (CVE-2026-50159)\n\nAffected packages:\n\n- `mermaid >= 11.0.0-alpha.1, < 11.16.1`\n- `mermaid < 10.9.8`\n\nPatched in:\n\n- `mermaid 11.16.1`\n- `mermaid 10.9.8`\n\nSource: https://github.com/advisories/GHSA-6x64-9x62-f2gx","depth":"sunlit","depthScore":28,"depthScoreParts":{"impact":27.5,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}