PT-2026-68752

CVE-2026-50159

·

Published

2026-08-06

·

Updated

2026-09-18

Description by

CVSS 4.0
5.3
Medium
MetricsAV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L
Name of the Vulnerable Software and Affected Versions Mermaid versions prior to 10.9.8 Mermaid versions prior to 11.16.1
Description Mermaid is vulnerable to CSS injection through sibling combinator selectors generated from class or id names provided in the diagram text. The software fails to fully restrict CSS to the rendered SVG subtree, allowing selectors using ~ or + combinators to escape the Mermaid container and apply styles to DOM elements adjacent to the diagram <svg>. This occurs because CSS nesting expands these combinators to select all sibling elements following the SVG in the DOM, outside the diagram boundary. An attacker providing diagram source can use this to perform UI redressing, hide content, conduct conditional CSS-based probing, or execute phishing-style visual manipulation. This issue primarily affects users who manually insert the <svg> into the DOM rather than using the default rendering method.
Recommendations Update to version 10.9.8 or later. Update to version 11.16.1 or later. Wrap the <svg> in an element with no other children, such as a <div>, or use mermaid.run() or mermaid.initialize() to handle insertion. Set the securityLevel configuration to sandbox. Set the secure configuration value to prevent diagrams from modifying fontFamily, themeCSS, altFontFamily, and themeVariables.
Exploitability
Exploit
Fix
Impacts
Vendors
Affected products
Related identifiers
GHSA-6X64-9X62-F2GX
CLEANSTART-2026-TH91746
Found an issue in the description? Have something to add? Feel free to write us 👾