Vulnerability library
Security checkAugust 20, 2025

Mermaid does not properly sanitize architecture diagram iconText leading to XSS

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmmermaid

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

In the default configuration of mermaid 11.9.0, user supplied input for architecture diagram icons is passed to the d3 html() method, creating a sink for cross site scripting.

Recommendation

Update the mermaid package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 11.1.0, < 11.10.0
  • Patched version(s): 11.10.0

References

Could your website be exposed too?

SmartScanner can check your website for Mermaid does not properly sanitize architecture diagram iconText leading to XSS and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated August 20, 2025