Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit untrusted JS to vm2 sandbox
-
DeliveryRegister FinalizationRegistry busy-loop callback
-
ExploitDrop strong reference to object
-
Executionvm.run() returns within timeout
-
PersistGC later reclaims object, invokes callback
-
ImpactEvent loop blocked, host DoS
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the host application (1) executes attacker-controlled JavaScript inside a vm2 VM/NodeVM instance and (2) relies on the VM({timeout}) option as its resource-exhaustion control - vm2's intended use case. The attacker uses FinalizationRegistry and WeakRef, which are exposed to the sandbox unmodified because they are not among the hardened globals in lib/setup-sandbox.js. The primary limiting factor is timing controllability: the DoS fires only when V8's garbage collector reclaims the dropped object, which is non-deterministic and depends on host memory pressure (or --expose-gc), so the attacker cannot precisely schedule the disruption. Impact is availability only - no sandbox escape, code execution, or data disclosure. Affects vm2 <= 3.11.6; fixed in 3.11.7. |
| Impact | This is an availability-only denial-of-service (CWE-400) affecting the vm2 sandbox, and its real-world priority is bounded by a hard precondition: the host application must run attacker-controlled JavaScript inside a vm2 instance and rely on VM({timeout}) as a control - vm2's core threat model. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H, base 8.7) reflects a fully unauthenticated network reach and high availability impact but zero confidentiality/integrity impact, which is consistent with the description - there is no code escape here, only an event-loop block. My independent CVSS 3.1 assessment is ~7.5 (A:H, S:U). No EPSS score, no CISA KEV entry, and no public exploit code are present in the supplied intelligence, so exploitation status is 'no public exploit identified at time of analysis' - do not treat this as actively exploited. One nuance the CVSS vectors understate: the description is explicit that trigger timing depends on the garbage collector (memory pressure or --expose-gc), so the attacker cannot reliably choose WHEN the DoS fires - this argues for AC:H in practice even though the DoS is eventually guaranteed once GC reclaims the object. Net: a genuine but conditional DoS, not a critical remote-compromise issue; it matters only to deployments that hand vm2 untrusted code and depend on the timeout option. |
| Exploit ScenarioDerived | An application uses vm2 with a configured timeout to safely run untrusted user-supplied JavaScript (e.g. a plugin, formula, or code-runner service). The attacker submits code that registers a FinalizationRegistry cleanup callback containing an infinite busy loop against an object, then drops the only strong reference; vm.run() returns cleanly within the timeout, but when V8's garbage collector later reclaims the object it invokes the busy-loop callback outside all vm2 timeout accounting, freezing the host Node.js event loop and denying service to all users. No public proof-of-concept is referenced in the supplied intelligence. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Denial of service in vm2 through 3.11.6 lets sandboxed JavaScript escape the VM({ timeout }) accounting and block the host event loop indefinitely. Because FinalizationRegistry and WeakRef are exposed to the sandbox unmodified (they are not among the hardened globals in lib/setup-sandbox.js) and the timeout only wraps the single _runScript() call via doWithTimeout() in lib/vm.js, sandboxed code can register a FinalizationRegistry cleanup callback, drop the last strong reference to the target object, and return from vm.run() well within the configured timeout; when V8 later reclaims the object it invokes the sandboxed callback with no timeout in effect, so a busy loop there hangs the host process for an unbounded period. Exploitation requires a host application that executes attacker-controlled JavaScript inside vm2 and relies on VM({timeout}) as its resource-exhaustion control - vm2's intended use case. Impact is availability only (no sandbox escape, code execution, or data disclosure), and no public exploit identified at time of analysis; the main practical limiter is that GC timing is non-deterministic and only loosely influenced by the attacker via memory pressure or --expose-gc.
RemediationAI
Upgrade vm2 to 3.11.7, which hardens the timeout path against GC-deferred execution; this is the vendor-released fix and the only complete remediation. If upgrading is not immediately possible, remove or neutralize FinalizationRegistry and WeakRef inside the sandbox (delete them from the globals passed to the VM, or override them in lib/setup-sandbox.js) - accept that sandboxed code legitimately depending on those APIs will break. Do not treat VM({timeout}) as a sufficient resource-exhaustion control in any version: run untrusted code inside a worker thread or child process with an external wall-clock kill and memory ceiling, or under container CPU/RSS limits, so a GC-triggered callback that blocks the host event loop can be terminated rather than hanging the process; this costs isolation complexity and per-execution overhead. Constraining V8 heap size and avoiding --expose-gc in production reduces, but does not eliminate, an attacker's ability to influence GC timing. Advisory references: https://github.com/patriksimek/vm2/security/advisories/GHSA-r4fx-v8hh-22mv and https://www.vulncheck.com/advisories/vm2-before-3.11.7-timeout-bypass-via-finalizationregistry.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
vm2 is a Node.js sandbox library that executes untrusted JavaScript in a V8 context with a curated set of globals; lib/setup-sandbox.js hardens the objects reachable from sandboxed code. CVE-2026-92942 is a CWE-400 (Uncontrolled Resource Consumption) flaw in that hardening surface: FinalizationRegistry and WeakRef were omitted from the hardened globals, and lib/vm.js applies the VM({ timeout }) budget only to the synchronous _runScript() invocation through doWithTimeout(), with no accounting for work deferred to V8 garbage-collection callbacks. FinalizationRegistry cleanup callbacks run on the engine's GC path, not inside the vm2 timeout wrapper, so sandboxed code can schedule arbitrary blocking work that executes after vm.run() has returned. The affected package is patriksimek/vm2 (CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*), versions <= 3.11.6, fixed in 3.11.7. The assessed vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H reflects network-reachable input paths with high attack complexity (GC-timed, non-deterministic trigger) and availability-only impact; the vendor-supplied CVSS 4.0 score of 8.7 similarly scores VC:N/VI:N with VA:H, confirming that integrity and confidentiality are not at risk.
Know when Vm2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Unauthenticated untrusted code triggers it (PR:N), but GC-dependent, attacker-uncontrollable timing makes it AC:H; availability-only within the same host process, so S:U/A:H, C/I:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 before 3.11.7 (affected versions <= 3.11.6) does not enforce the VM({ timeout }) option on code executed outside the synchronous VM#run() call. The timeout only wraps the single call to _runScript() via doWithTimeout() in lib/vm.js, and FinalizationRegistry and WeakRef are exposed to sandboxed code unmodified (they are not among the hardened globals in lib/setup-sandbox.js). Sandboxed code can register a FinalizationRegistry cleanup callback against an object and then drop the only strong reference to it; vm.run() returns within the configured timeout, but when the V8 garbage collector later reclaims the object it invokes the sandboxed cleanup callback outside any vm2 timeout accounting. A busy loop in that callback blocks the host event loop for an unbounded period, resulting in denial of service. The time of invocation depends on the garbage collector (e.g. under memory pressure or with --expose-gc).
Technical POC Analysis
CWE-400 (Uncontrolled Resource Consumption), secondary CWE-841 (Improper Enforcement of Behavioral Workflow).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Organizations that use vm2 (through version 3.11.6) to execute untrusted or third-party JavaScript - a common pattern in plugin engines, low-code platforms, and multi-tenant automation services - face a host-process availability failure rather than a data breach. Sandboxed code can evade the VM({timeout}) accounting and hang the Node.js event loop indefinitely, meaning a single malicious or careless tenant can take down an entire service instance and everything co-resident on it. Because vm2 is the library's intended use case, any product embedding it for untrusted code is in scope, and no vendor patch is currently available, so leadership should treat this as a resilience and continuity risk requiring interim architectural controls. No public exploit identified at time of analysis, and impact is availability only - no sandbox escape, code execution, or data disclosure.
No vendor-released patch identified at time of analysis. Interim mitigations: isolate vm2 execution in dedicated child processes or containers with hard CPU/wall-clock limits and an external kill-and-restart supervisor; disable, delete, or shadow FinalizationRegistry and WeakRef in the sandbox global scope via lib/setup-sandbox.js so cleanup callbacks cannot run outside the doWithTimeout() wrapper; monitor event-loop lag and worker hangs with automated alerting and forced restarts; cap concurrency and rate-limit script submissions; restrict untrusted-script execution to trusted or reviewed tenants; and plan migration to an OS-level sandbox or maintainable isolate runtime rather than relying on VM({timeout}) alone.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
vm2 is an advanced vm/sandbox for Node.js. Rated critical severity (CVSS 10.0), this vulnerability is remotely exploitab
vm2 is a sandbox that can run untrusted code with Node's built-in modules. Rated critical severity (CVSS 10.0), this vul
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.
There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15,
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.
This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr
Full sandbox escape with arbitrary code execution allows remote attackers to break out of vm2's Node.js sandbox environm
Sandbox escape in vm2 for Node.js allows remote unauthenticated attackers to execute arbitrary commands on the host syst
Sandbox escape in vm2 (patriksimek/vm2) versions prior to 3.11.3 enables remote code execution on the host Node.js proce
Sandbox escape in vm2 Node.js sandbox before 3.10.2 via Promise.prototype.then/catch callback sanitization bypass. PoC a
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 9.8
The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the We
EUVD-2026-81592
GHSA-vjcv-9j33-wj62
NVD
CVE.org
EPSS
Exploit-DB