{"id":"CVE-2025-62410","published":"2025-10-15T17:16:21Z","modified":"2025-10-15T18:16:44Z","title":"--disallow-code-generation-from-strings is not sufficient for isolating untrusted JavaScript in happy-dom","vendor":"capricorn86","product":"happy-dom","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"CRITICAL","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0069,"percentile":0.48082,"provenance":"source"},"cwes":[{"id":"CWE-1321","name":"Improperly Controlled Modification of Object Prototype Attributes"}],"references":[{"url":"https://github.com/capricorn86/happy-dom/security/advisories/GHSA-qpm2-6cq5-7pq5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/capricorn86/happy-dom/commit/f4bd4ebe3fe5abd2be2bcea1c07043c8b0b70eea","tags":["x_refsource_MISC"]}],"priority":{"score":16.2,"factors":[{"name":"EPSS percentile","points":9.62},{"name":"CVSS severity","points":6.58}]},"vendorSlug":"capricorn86","affectedVersions":[{"vendor":"capricorn86","product":"happy-dom","versions":["< 20.0.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-10-15T18:15:58.306559Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"happy-dom","vulnerableRanges":[">=19.0.0, <20.0.2"],"patched":["20.0.2"],"from":["GHSA-qpm2-6cq5-7pq5"],"provenance":"source"}],"summary":{"text":"The happy-dom JavaScript DOM library fails to isolate untrusted JavaScript: the --disallow-code-generation-from-strings flag does not prevent untrusted scripts from running in the same Isolate and process as the rest of the application. An attacker who can get untrusted script executed in that environment, with low privileges and requiring user interaction, can use prototype pollution payloads to hijack references such as \"process\" or alter control flow by manipulating undefined-property checks, with high impact to confidentiality, integrity and availability of the vulnerable system.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:43:36Z"},"euvd":{"id":"EUVD-2025-34678","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-capricorn86-happy-dom-cve-2025-61927","parents":[{"from":"CVE-2025-61927","to":"CVE-2025-62410","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"This vulnerability is due to an incomplete fix for CVE-2025-61927.","from":"CVE.org","in":"CVE-2025-62410"},{"kind":"version-step","provenance":"source","package":"npm:happy-dom","fromFixed":"20.0.0","toFixed":"20.0.2","daysApart":5},{"kind":"same-code","provenance":"machine","files":["packages/@happy-dom/server-renderer/src/ServerRenderer.ts"],"commits":["https://github.com/capricorn86/happy-dom/commit/819d15ba289495439eda8be360d92a614ce22405","https://github.com/capricorn86/happy-dom/commit/de438ad72921c69793584aa657b48d3655dfac97","https://github.com/capricorn86/happy-dom/commit/f4bd4ebe3fe5abd2be2bcea1c07043c8b0b70eea"],"basis":"shared function","functions":["ServerRenderer"]}]}],"packageHistory":[{"cve":"CVE-2024-51757","published":"2024-11-06","fixed":"15.10.2","kev":false},{"cve":"CVE-2025-61927","published":"2025-10-10","fixed":"20.0.0","kev":false},{"cve":"CVE-2025-62410","published":"2025-10-15","fixed":"20.0.2","kev":false},{"cve":"CVE-2026-33943","published":"2026-03-27","fixed":"20.8.8","kev":false,"link":{"from":"CVE-2025-62410","to":"CVE-2026-33943","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:happy-dom","fromFixed":"20.0.2","toFixed":"20.8.8","daysApart":163}]}},{"cve":"CVE-2026-34226","published":"2026-03-27","fixed":"20.8.9","kev":false},{"cve":"CVE-2026-118661","published":"2026-10-28","fixed":"20.14.6","kev":false}],"package":"npm:happy-dom"}}