VDB
Sign up
MEDIUM4.9

GHSA-x7hr-w5r2-h6wg

PrismJS DOM Clobbering vulnerability

Quick fix

GHSA-x7hr-w5r2-h6wg — prismjs: upgrade to the fixed version with the command below.

npm install prismjs@1.30.0

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/prismjs
Introduced in: 0Fixed in: 1.30.0
Fixnpm install prismjs@1.30.0

References