Impact
Mermaid allows the injection of arbitrary CSS through diagram‑defined class or id names that are turned into sibling selector strings in the generated stylesheet. This flaw lets an attacker who controls diagram text insert styles that affect elements outside the diagram, enabling visual manipulation. The CVE does not report any additional exploitation beyond style changes. The issue is a code‑injection weakness catalogued as CWE‑94.
Affected Systems
The Mermaid JavaScript library (mermaid‑js/mermaid) prior to versions 10.9.8 and 11.16.1 is vulnerable; any downstream projects or websites that load those older releases and render user‑supplied diagram text are impacted.
Risk and Exploitability
The vulnerability carries a medium risk rating, with a CVSS score of 5.3, no EPSS data available, and it is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply diagram text that the application renders, making the likely vector a remote or local injection via user input. The impact is confined to the affected application’s client side and does not provide direct code execution or privilege escalation.
OpenCVE Enrichment
Github GHSA