---
title: "CVE-2025-62410: happy-dom's `--disallow-code-generation-from-strings` is not sufficient for isolating untrusted JavaScript"
url: https://erroneo.us/security/cve/CVE-2025-62410/
description: "CVE-2025-62410 (happy-dom (npm)): In versions before 20.0.2, it was found that --disallow-code-generation-from-strings is not sufficient for isolating…"
type: vulnerability-record
section: "Security Digest"
date_published: 2025-10-15
date_modified: 2025-11-27
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2025-62410"
kev: false
cvss: 9.4
epss: 0.00352
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2025-62410: happy-dom's `--disallow-code-generation-from-strings` is not sufficient for isolating untrusted JavaScript

**Signal:** Critical, preconditions apply. Severe if exploited, but exploitation needs conditions that may not apply to you. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.4% , percentile 28: FIRST’s model estimates a 0.4% chance of exploitation activity in the next 30 days, higher than 28% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Needs an account (low (any account)). Exposure depends on who can log in.
- Only applies if your dependency tree includes happy-dom (npm) >= 19.0.0, < 20.0.2, fixed in 20.0.2 . Check your lockfile, including transitive dependencies.

## What it is

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

- npm `happy-dom` >= 19.0.0, < 20.0.2 → fixed: 20.0.2

## Affected products (CVE record)

- capricorn86 happy-dom: < 20.0.2

## Severity

- GitHub_M CVSS 4.0: 9.4 `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`
- GitHub CVSS 4.0: 9.4 `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`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.35% probability of exploitation activity in the next 30 days; percentile 28.

## Sources

- [GitHub Advisory GHSA-qpm2-6cq5-7pq5](https://github.com/advisories/GHSA-qpm2-6cq5-7pq5)
- [CVE.org record CVE-2025-62410](https://www.cve.org/CVERecord?id=CVE-2025-62410)
- [NVD entry CVE-2025-62410](https://nvd.nist.gov/vuln/detail/CVE-2025-62410)
- [github.com](https://github.com/capricorn86/happy-dom/security/advisories/GHSA-qpm2-6cq5-7pq5)
- [github.com](https://github.com/capricorn86/happy-dom/commit/f4bd4ebe3fe5abd2be2bcea1c07043c8b0b70eea)

---
Source page: https://erroneo.us/security/cve/CVE-2025-62410/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
