Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-50159 EUVD-2026-54243GHSA-6x64-9x62-f2gx

Mermaid allows CSS injection applying to sibling elements of the diagram

Published Aug 6, 2026 · Updated Aug 7, 2026 · 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.

Affected products

VendorProductAffectedFixed
mermaid-js mermaid < 10.9.8, >= 11.0.0-alpha.1, < 11.16.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-mermaid No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-mermaid No fix yet —
Ubuntu 22.04 LTS node-mermaid No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling jupyter-base-notebook 7.6.3-r2 —
Wolfi rolling langfuse-3-compat 3.225.7-r6 —
Wolfi rolling langfuse-3-worker 3.225.1-r2 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm mermaid >= 11.0.0-alpha.1, < 11.16.1 11.16.1 GHSA-6x64-9x62-f2gx
npm mermaid < 10.9.8 10.9.8 GHSA-6x64-9x62-f2gx

References