beautiful-mermaid is vulnerable to Cross-site Scripting (XSS)
61
Medium Risk
Affected versions of this package allow crafted Mermaid diagrams to inject arbitrary SVG attributes and elements because user-controlled values from style and classDef directives are interpolated into SVG attributes without proper escaping, enabling XSS and element injection. An attacker can exploit this by supplying malicious values that prematurely close SVG tags and inject new elements such as <svg onload> to execute JavaScript on render, or <image> tags to load external resources for data exfiltration.
You are affected if you are using a version that falls within the vulnerable range.
beautiful-mermaid is vulnerable to Cross-site Scripting (XSS) in versions 0.1.0 - 0.1.2.
Upgrade the beautiful-mermaid library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant