Vulnerability library
Security checkJuly 21, 2023

Possible inject arbitrary `CSS` into the generated graph affecting the container HTML

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

An attacker is able to inject arbitrary CSS into the generated graph allowing them to change the styling of elements outside of the generated graph, and potentially exfiltrate sensitive information by using specially crafted CSS selectors.

Recommendation

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

  • Affected version(s): >= 8.0.0, < 9.1.2
  • Patched version(s): 9.1.2

References

Could your website be exposed too?

SmartScanner can check your website for Possible inject arbitrary `CSS` into the generated graph affecting the container HTML and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated July 21, 2023