Description
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.1, when a NodeVM is created with nesting: true, sandbox code can unconditionally require('vm2') regardless of the outer VM's require configuration — including require: false. With access to vm2, the sandbox constructs a new inner NodeVM with its own unrestricted require settings and executes arbitrary OS commands on the host. Any application that runs untrusted code inside a NodeVM with nesting: true is fully compromised. This vulnerability is fixed in 3.11.1.
Published: 2026-05-13
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

vm2 is an open source Node.js virtual machine and sandboxing library. The flaw occurs when a NodeVM is created with nesting:true, which bypasses the outer VM’s require:false setting. Code running inside the sandbox can then require the vm2 module, instantiate a second NodeVM with unrestricted require, and execute arbitrary OS commands on the host. This is an authorization failure (CWE‑284) that results in remote code execution and full compromise of the application and its underlying system.

Affected Systems

The affected product is patriksimek’s vm2. All versions prior to 3.11.1 are vulnerable. The issue is triggered specifically when the outer VM is configured with nesting:true, independent of the require setting. Applications that run untrusted code inside such a nested NodeVM are therefore fully compromised.

Risk and Exploitability

The CVSS score is 9.1, indicating critical severity. EPSS information is not available, so exploitation probability is not quantified, but the flaw is not listed in the CISA KEV catalog. Exploitation requires an attacker to supply malicious code to a NodeVM that has been configured with nesting:true; once the code is executed, the attacker can run any operating‑system command, giving them unrestricted control.

Generated by OpenCVE AI on May 13, 2026 at 19:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade vm2 to version 3.11.1 or later, which removes the nesting bypass.
  • If an upgrade is not possible at the moment, set nesting:false (or do not use nested NodeVMs) in all NodeVM configurations that execute untrusted code.
  • If disabling nesting is not feasible, isolate untrusted code in a separate process or switch to an alternative sandbox solution until the library is updated.

Generated by OpenCVE AI on May 13, 2026 at 19:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8hg8-63c5-gwmx vm2 NodeVM `nesting: true` bypasses `require: false` allowing sandbox escape and arbitrary OS command execution
History

Fri, 15 May 2026 10:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 14 May 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Vm2 Project
Vm2 Project vm2
CPEs cpe:2.3:a:vm2_project:vm2:*:*:*:*:*:node.js:*:*
Vendors & Products Vm2 Project
Vm2 Project vm2

Wed, 13 May 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Patriksimek
Patriksimek vm2
Vendors & Products Patriksimek
Patriksimek vm2

Wed, 13 May 2026 18:30:00 +0000

Type Values Removed Values Added
References

Wed, 13 May 2026 18:00:00 +0000

Type Values Removed Values Added
Description vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.1, when a NodeVM is created with nesting: true, sandbox code can unconditionally require('vm2') regardless of the outer VM's require configuration — including require: false. With access to vm2, the sandbox constructs a new inner NodeVM with its own unrestricted require settings and executes arbitrary OS commands on the host. Any application that runs untrusted code inside a NodeVM with nesting: true is fully compromised. This vulnerability is fixed in 3.11.1.
Title vm2: nesting: true bypasses require: false, allowing sandbox escape to arbitrary OS command execution
Weaknesses CWE-284
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-15T09:58:32.221Z

Reserved: 2026-05-04T21:24:36.505Z

Link: CVE-2026-44007

cve-icon Vulnrichment

Updated: 2026-05-13T17:45:33.625Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-13T18:16:17.527

Modified: 2026-05-14T15:18:26.150

Link: CVE-2026-44007

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-13T20:30:03Z

Weaknesses