# vm2 NodeVM sandbox escape via child_process

Source: https://junglewise.ai/threats/duplicate-advisory-vm2-contains-a-sandbox-escape-vulnerability-3d9d2178  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-18. Updated: 2026-10-07  
License: CC BY 4.0 with a link back

Severity: critical · CVSS 10 · Published 2026-09-18

vm2 is a Node.js virtual machine library used to safely execute untrusted JavaScript code in isolation. Versions before 3.12.1 contain a flaw where the child_process module is not blocked from the sandbox despite protections on other modules, allowing attackers to execute arbitrary system commands with the privileges of the Node.js process. This breaks the entire sandbox security model when child_process is accessible.

Technologies: [vm2 (npm)](https://junglewise.ai/threats/technologies/vm2). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Vm2](https://junglewise.ai/threats/vendors/vm2).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Critical severity, with a CVSS score of 10, published 18 September 2026.

**Which products and versions are affected?** vm2 (npm) < 3.12.1; Vm2 NodeVM < 3.12.1.

**Is there a fix for This vulnerability?** Yes: fixed in 3.12.1. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network.

**Am I affected?** Check whether you run vm2 (npm) or Vm2 NodeVM at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.12.1

## Technical details

The DANGEROUS_BUILTINS denylist in NodeVM fails to include child_process, allowing attackers to require() it directly when NodeVM is configured with builtin:['*'] or explicit child_process allowance. This protection mechanism failure (CWE-693) enables arbitrary command execution on the host system. The vulnerability requires application-level misconfiguration that explicitly permits builtins or child_process access.

## Affected products

- vm2 NodeVM < 3.12.1

## Timeline

- 2026-09-18: disclosed

## References

- [https://api.github.com/users/portyu9](https://api.github.com/users/portyu9)

## Related threats

- [vm2 NodeVM path bypass in custom resolution](https://junglewise.ai/threats/duplicate-advisory-vm2-nodevm-custom-resolution-bypasses-external-path-5d3a7272)
- [vm2 NodeVM zlib buffer pool information disclosure](https://junglewise.ai/threats/duplicate-advisory-vm2-nodevm-zlib-buffers-expose-pooled-host-memory-6007c734)
- [vm2 host Promise rejection denial of service in construct trap](https://junglewise.ai/threats/duplicate-advisory-vm2-host-promise-rejection-from-an-exposed-f7aba6ba)
- [vm2 sandbox escape via Buffer backing-store ownership bypass](https://junglewise.ai/threats/cve-2026-100723-vm2-before-3-12-2-does-not-apply-its-buffer-backing-store)
- [vm2 unhandled Promise rejection in construct trap](https://junglewise.ai/threats/cve-2026-100722-vm2-before-3-12-2-does-not-apply-host-side-promise-rejection)
