CVE-2025-61927
published high CVSS 4.0 · 7.2Happy-DOM has VM Context Escape
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| capricorn86 | — | happy-dom< 20.0.0 | Affected | Not stated | GitHub_M |
Description
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. Happy DOM v19 and lower contains a security vulnerability that puts the owner system at the risk of RCE (Remote Code Execution) attacks. A Node.js VM Context is not an isolated environment, and if the user runs untrusted JavaScript code within the Happy DOM VM Context, it may escape the VM and get access to process level functionality. It seems like what the attacker can get control over depends on if the process is using ESM or CommonJS. With CommonJS the attacker can get hold of the `require()` function to import modules. Happy DOM has JavaScript evaluation enabled by default. This may not be obvious to the consumer of Happy DOM and can potentially put the user at risk if untrusted code is executed within the environment. Version 20.0.0 patches the issue by changing JavaScript evaluation to be disabled by default.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 7.2 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:A/VC:L/VI:H/VA:H/SC:H/SI:H/SA:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| capricorn86 | happy-dom | < 20.0.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection')
References
2Provider assertions
2GitHub_M · cna
Happy-DOM has VM Context Escape
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 34f4da0f3b9881dacf96736693a9290863a6697a958007f6a806624c486bb423
- Ingested
- 23 Sep 2026, 08:55:27 UTC
- Source record
- Official CVE record