CVE-2025-61927: Happy-DOM has VM Context Escape
Vulnerability summary
CVE-2025-61927 is a high (CVSS 7.2) Improper Control of Generation of Code vulnerability in capricorn86 happy-dom. EPSS estimates a 0.67% chance of exploitation in the next 30 days, higher than 53.2% of scored vulnerabilities.
Not severe (CVSS 7.2, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 10-10-2025PublishedVulnerability first disclosed.
- 10-10-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · NpmEcosystem advisory · calculated10.0CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:PDiffers
- NVDNIST7.2HighCVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:A/VC:L/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS trend
Probability
0.67%
Chance of exploitation in the next 30 days
Percentile
53%
Versus all other CVEs
30-day change
Increase +0.03 pp
From 0.64% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, administrative account, user interaction (CVSS vector). Other conditions: not stated in public data.
Capricorn861 product
- happy-dom< 20.0.0
Npm1 product
- happy-dom< 20.0.0
2 vendors · 2 products