CVE-2024-53382 Details
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.
A DOM clobbering vulnerability has been identified in PrismJS versions through 1.29.0. This issue allows for cross-site scripting (XSS) attacks in web pages that embed Prism and permit users to inject HTML elements without scripts, such as an image tag with a controlled name attribute. The vulnerability arises because the Prism autoloader plugin's use of 'document.currentScript' can be manipulated by attacker-injected HTML, leading to the execution of malicious scripts.
Users are advised to update to the latest version of PrismJS, where this vulnerability has been addressed. For those using version 1.29.0, a manual patch is available by adding an additional type check when accessing 'document.currentScript' to ensure it only returns script elements.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 3, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://gist.github.com/jackfromeast/aeb128e44f05f95828a1a824708df660 | CISA-ADP | ExploitPatchThird Party Advisory |
| https://gist.github.com/jackfromeast/aeb128e44f05f95828a1a824708df660 | [email protected] | ExploitPatchThird Party Advisory |
| https://github.com/PrismJS/prism/blob/59e5a3471377057de1f401ba38337aca27b80e03/prism.js#L226-L259 | [email protected] | Product |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| prismjs prism | <= 1.29.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 27, 2025 | Initial Analysis | [email protected] |
| Mar 3, 2025 | CVE Modified | CISA-ADP |
| Mar 3, 2025 | New CVE Received | [email protected] |