Vulnerability library
Security checkJune 30, 2025

PrismJS DOM Clobbering vulnerability

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

Medium severitynpmprismjs

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Prism (aka PrismJS) through 1.29.0 allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), because document.currentScript lookup can be shadowed by attacker-injected HTML elements.

Recommendation

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

  • Affected version(s): < 1.30.0
  • Patched version(s): 1.30.0

References

Could your website be exposed too?

SmartScanner can check your website for PrismJS DOM Clobbering vulnerability and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated June 30, 2025