Vulnerability · Published Oct 15, 2025 · Assigned by GitHub_M
CVE-2025-62410--disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom
Critical 9.4
In plain English
A critical-severity prototype pollution in happy-dom from capricorn86. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 30% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | happy-dom | 20.0.2 | GHSA-qpm2-6cq5-7pq5 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| capricorn86 | happy-dom | < 20.0.2 |
Weakness: CWE-1321 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H