CVE-2024-53386: Stage.js DOM Clobbering vulnerabilty
4.9
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.16743%
CWE
Published
3/3/2025
Updated
3/3/2025
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| stage-js | npm | <= 0.8.10 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from Stage.js's URL resolution logic in Class.resolve. The nested getScriptSrc function (lines 158-159 in core.js) relies on document.currentScript which is vulnerable to DOM clobbering via elements like <img name='currentScript'>. This allows attackers to control the base URL used for script loading, enabling malicious script injection. The provided PoC demonstrates this by overriding document.currentScript.src to load external resources. The direct use of document.currentScript without DOM clobbering protections makes this function the primary vulnerability vector.