Intel

AIKIDO-2026-10157

beautiful-mermaid is vulnerable to Cross-site Scripting (XSS)

CVE-2026-26226Published Feb 10, 2026
February 10, 2026

61

CVE Score

Medium

Cross-site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the beautiful-mermaid library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Versions

0.1.0 - 0.1.2

Fixed in 0.1.3

Background info

beautiful-mermaid is vulnerable to Cross-site Scripting (XSS) in versions 0.1.0 - 0.1.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea