CVE-2025-62410 --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom
CriticalCVSS 9.4
EPSS 0.38%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: total
Description
In versions before 20.0.2, it was found that --disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom. The untrusted script and the rest of the application still run in the same Isolate/process, so attackers can deploy prototype pollution payloads to hijack important references like "process" in the example below, or to hijack control flow via flipping checks of undefined property. This vulnerability is due to an incomplete fix for CVE-2025-61927. The vulnerability is fixed in 20.0.2.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm happy-dom(npm) | >= 19.0.0, < 20.0.2 | 20.0.2 | Fixed |
| capricorn86 happy-dom | = < 20.0.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm happy-dom(npm) | >= 19.0.0, < 20.0.2 | 20.0.2 |
| capricorn86 happy-dom | = < 20.0.2 | No fix listed |
References
- https://github.com/capricorn86/happy-dom/security/advisories/GHSA-qpm2-6cq5-7pq5 vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/capricorn86/happy-dom/commit/f4bd4ebe3fe5abd2be2bcea1c07043c8b0b70eea patch
- github.com
- github.com product