Vulnerability library
Security checkFebruary 03, 2023

Cross-site Scripting in Prism

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

High severitynpmprismjs

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Prism’s Command line plugin can be used by attackers to achieve an XSS attack. The Command line plugin did not properly escape its output, leading to the input text being inserted into the DOM as HTML code.

Server-side usage of Prism is not impacted. Websites that do not use the Command Line plugin are also not impacted.

Recommendation

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

  • Affected version(s): >= 1.14.0, < 1.27.0
  • Patched version(s): 1.27.0

References

Could your website be exposed too?

SmartScanner can check your website for Cross-site Scripting in Prism and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated February 03, 2023