PrismJS DOM Clobbering vulnerability
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | prismjs | < 1.30.0 | 1.30.0 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-53382
- https://github.com/PrismJS/prism/pull/3863
- https://github.com/PrismJS/prism/commit/8e8b9352dac64457194dd9e51096b4772532e53d
- https://gist.github.com/jackfromeast/aeb128e44f05f95828a1a824708df660
- https://github.com/PrismJS/prism
- https://github.com/PrismJS/prism/blob/59e5a3471377057de1f401ba38337aca27b80e03/prism.js#L226-L259
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79, CWE-94- Platform
- npm
- Package
prismjs- Disclosed
- 03.03.2025
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-x7hr-w5r2-h6wg - CC BY 4.0
Vulnerability history: prismjs
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 6
- First → latest
- 08.2020 03.2025
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 4
- Medium 2
Disclosures per year
- 2020: 1
- 2021: 3
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 1
- 2026: 0
-
PrismJS DOM Clobbering vulnerability this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.