Skip to content

GHSA-9fxx-mv6c-j5xp

Duplicate Advisory: NodeVM nesting guard accepts array-shaped require and permits host RCE

Critical Withdrawn Oct 1, 2026 npm
Severity
0.0 / 10
Critical · CVSS 4.0
Exploit chance (EPSS)
—
No score published
Known exploited
No
Not in CISA's catalog
Weakness
CWE-913 Improper Control of Dynamically-Managed Code Resources
Fix
None yet
No fixed version published

Description

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-8hr7-r645-pc6w. This link is maintained to preserve external references.

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

Affected versions

npm

PackageVulnerableFixed in
vm2
>= 3.11.4, <= 3.11.6
No fix yet

How to fix

No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/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

Attack vector
Network
Attack complexity
High
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
High
Integrity (vulnerable system)
High
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
High
Integrity (subsequent systems)
High
Availability (subsequent systems)
High
Exploit maturity
Not defined
Scope
X

CVSS 3.1 9.0

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-913: Improper Control of Dynamically-Managed Code Resources

The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.

How to prevent it
  • Implementation: For any externally-influenced input, check the input against an allowlist of acceptable values.
  • Implementation, Architecture and Design: Refactor the code so that it does not need to be dynamically managed.

References

Timeline

  1. Published
  2. Withdrawn
  3. Last updated by the source
AdvisorySeverityWhy it's related
GHSA-489w-w794-jq94
vm2: NodeVM zlib Buffers expose pooled host memory across the VM boundary
High Also affects vm2
GHSA-2v2p-6j97-cjg9
vm2: Host Promise rejection from an exposed constructor can terminate the vm2 host process
Medium Also affects vm2
GHSA-5h3f-q97h-ccvc
vm2: NodeVM custom resolution bypasses external path boundaries
Critical Also affects vm2
GHSA-pq68-rvw4-xp4r
vm2 contains a sandbox escape vulnerability
Critical Also affects vm2
GHSA-f8gf-w286-fmq2
vm2: `allowAsync: false` can be bypassed through Promise thenable assimilation in VM and NodeVM
High Also affects vm2
GHSA-6rh5-qq4q-97xh
vm2: NodeVM builtin denylist bypass via fs/promises despite -fs, allowing host filesystem writes
High Also affects vm2
GHSA-8686-vhfx-7r3j
vm2: NodeVM node:-prefixed negative builtin deny bypass exposes child_process
Critical Also affects vm2
GHSA-wjwh-qqvp-g4p4
vm2 sandbox escape via WebAssembly.compileStreaming Promise species bypass
Critical Also affects vm2
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor