CVE-2026-92935: Improper Control of Dynamically-Managed Code Resources in patriksimek vm2
vm2 is a sandbox for running untrusted Node.js code. In versions >= 3.11.4 and <= 3.11.6, the NodeVM constructor computes `hasRealRequireConfig` with `typeof requireOpts === 'object' && requireOpts !== null`, so an array-shaped `require` value (for example `require: []`) satisfies the guard that is meant to reject nesting without an explicit require configuration. `makeResolverFromLegacyOptions()` then destructures the array into undefined option fields and returns a resolver containing only `NESTING_OVERRIDE.vm2`. As a result, an attacker who can supply JavaScript executed by a NodeVM configured with truthy `nesting` and an array-shaped `require` (e.g. `new NodeVM({nesting: true, require: []})`) can require the host `vm2` module, create an inner NodeVM with an attacker-chosen builtin allowlist (such as `child_process`), and execute arbitrary commands with the privileges of the host Node.js process, escaping the sandbox. Outer builtin restrictions do not constrain the attacker-created inner NodeVM. This issue is fixed in vm2 3.11.7.
AI Analysis
Technical Summary
The vulnerability arises because the NodeVM constructor incorrectly accepts an array-shaped require option (e.g., require: []) as valid, bypassing intended nesting restrictions. This leads to a resolver that permits requiring the host vm2 module and creating an inner NodeVM with attacker-controlled builtin allowlists, such as child_process. Consequently, an attacker can execute arbitrary commands with the privileges of the host Node.js process, effectively escaping the sandbox. This flaw affects vm2 versions >=3.11.4 and <3.11.7 and is resolved in 3.11.7.
Potential Impact
An attacker able to supply JavaScript to a vulnerable NodeVM configured with nesting enabled and an array-shaped require option can escape the sandbox and execute arbitrary commands with the full privileges of the host Node.js process. This compromises the sandbox isolation and can lead to full system compromise where vm2 is used.
Mitigation Recommendations
Upgrade vm2 to version 3.11.7 or later, where this vulnerability is fixed. No other mitigations are indicated. Users should ensure that NodeVM is not configured with array-shaped require options and nesting enabled until patched.
CVE-2026-92935: Improper Control of Dynamically-Managed Code Resources in patriksimek vm2
Description
vm2 is a sandbox for running untrusted Node.js code. In versions >= 3.11.4 and <= 3.11.6, the NodeVM constructor computes `hasRealRequireConfig` with `typeof requireOpts === 'object' && requireOpts !== null`, so an array-shaped `require` value (for example `require: []`) satisfies the guard that is meant to reject nesting without an explicit require configuration. `makeResolverFromLegacyOptions()` then destructures the array into undefined option fields and returns a resolver containing only `NESTING_OVERRIDE.vm2`. As a result, an attacker who can supply JavaScript executed by a NodeVM configured with truthy `nesting` and an array-shaped `require` (e.g. `new NodeVM({nesting: true, require: []})`) can require the host `vm2` module, create an inner NodeVM with an attacker-chosen builtin allowlist (such as `child_process`), and execute arbitrary commands with the privileges of the host Node.js process, escaping the sandbox. Outer builtin restrictions do not constrain the attacker-created inner NodeVM. This issue is fixed in vm2 3.11.7.
CVSS v4.0
Score 9.5critical
Affected software
patriksimek
vm2
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because the NodeVM constructor incorrectly accepts an array-shaped require option (e.g., require: []) as valid, bypassing intended nesting restrictions. This leads to a resolver that permits requiring the host vm2 module and creating an inner NodeVM with attacker-controlled builtin allowlists, such as child_process. Consequently, an attacker can execute arbitrary commands with the privileges of the host Node.js process, effectively escaping the sandbox. This flaw affects vm2 versions >=3.11.4 and <3.11.7 and is resolved in 3.11.7.
Potential Impact
An attacker able to supply JavaScript to a vulnerable NodeVM configured with nesting enabled and an array-shaped require option can escape the sandbox and execute arbitrary commands with the full privileges of the host Node.js process. This compromises the sandbox isolation and can lead to full system compromise where vm2 is used.
Mitigation Recommendations
Upgrade vm2 to version 3.11.7 or later, where this vulnerability is fixed. No other mitigations are indicated. Users should ensure that NodeVM is not configured with array-shaped require options and nesting enabled until patched.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-09-17T12:42:34.828Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aac405055bf5e2cf5cb2380
Added to database: 09/17/2026, 19:32:32 UTC
Last enriched: 09/17/2026, 19:46:50 UTC
Last updated: 09/17/2026, 22:52:48 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.