THREATOPS
THREAT OPSThreat News › [GHSA] GHSA-6x64-9x62-f2gx (medium) — Mermaid allows CSS injection applying to sibling elements of the diagram

[GHSA] GHSA-6x64-9x62-f2gx (medium) — Mermaid allows CSS injection applying to sibling elements of the diagram

highgithub_advisoriesPublished 2026-08-06

GHSA-6x64-9x62-f2gx Severity: medium CVE: CVE-2026-50159

Mermaid allows CSS injection applying to sibling elements of the diagram

### Summary

Mermaid does not fully restrict CSS to the rendered SVG subtree. Although selectors are prefixed with `#mermaid-X`, sibling (`~` and `+`) combinators can still escape the Mermaid container and inject styles to DOM elements adjacent to the diagram `<svg>`.

MITRE ATT&CK techniques

Indicators of compromise

Original source: https://github.com/advisories/GHSA-6x64-9x62-f2gx