Skip to main content

vm2 CVE-2026-92942

| EUVDEUVD-2026-81592 HIGH
Uncontrolled Resource Consumption (CWE-400)
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit untrusted JS to vm2 sandbox
  2. Delivery
    Register FinalizationRegistry busy-loop callback
  3. Exploit
    Drop strong reference to object
  4. Execution
    vm.run() returns within timeout
  5. Persist
    GC later reclaims object, invokes callback
  6. Impact
    Event 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

vm2 0 <3.11.7

Affected Packages

npm vm2 fix: 3.11.7

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

Vendor (VulnCheck) PRIMARY 8.7 HIGH
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
vuln.today AI 5.9 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 17, 2026 - 15:17 EUVD
CVE Published
Sep 17, 2026 - 13:46 cve.org
HIGH 8.7

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 72% exploitable
Prevalence
Medium
popular but deprecated Node.js sandboxing library, embedded in many apps
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Vm2

View all
CVE-2023-37466 CRITICAL POC
10.0 Jul 14

vm2 is an advanced vm/sandbox for Node.js. Rated critical severity (CVSS 10.0), this vulnerability is remotely exploitab

CVE-2023-32314 CRITICAL POC
10.0 May 15

vm2 is a sandbox that can run untrusted code with Node's built-in modules. Rated critical severity (CVSS 10.0), this vul

CVE-2023-30547 CRITICAL POC
10.0 Apr 17

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.

CVE-2023-29199 CRITICAL POC
10.0 Apr 14

There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15,

CVE-2022-36067 CRITICAL POC
10.0 Sep 06

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2026-26956 CRITICAL POC
9.8 May 04

Full sandbox escape with arbitrary code execution allows remote attackers to break out of vm2's Node.js sandbox environm

CVE-2026-24120 CRITICAL POC
9.8 May 04

Sandbox escape in vm2 for Node.js allows remote unauthenticated attackers to execute arbitrary commands on the host syst

CVE-2026-45411 CRITICAL POC
9.8 May 13

Sandbox escape in vm2 (patriksimek/vm2) versions prior to 3.11.3 enables remote code execution on the host Node.js proce

CVE-2026-22709 CRITICAL POC
9.8 Jan 26

Sandbox escape in vm2 Node.js sandbox before 3.10.2 via Promise.prototype.then/catch callback sanitization bypass. PoC a

CVE-2023-29017 CRITICAL POC
9.8 Apr 06

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 9.8

CVE-2022-25893 CRITICAL POC
9.8 Dec 21

The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the We

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy