# CVE-2026-92935: vm2 sandbox escape via array-shaped require option

Source: https://junglewise.ai/threats/cve-2026-92935-vm2-sandbox-escape-via-array-shaped-require-option  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-17. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-92935 · Severity: critical · CVSS 9 · Published 2026-09-17

vm2 is a sandbox for running untrusted Node.js code. When configured with nesting enabled and an array-shaped require option, an attacker can bypass security controls to load the host vm2 module, create a malicious inner sandbox with unrestricted access to system modules like child_process, and execute arbitrary commands on the host system. This completely defeats the sandbox's isolation and allows an attacker to compromise the entire Node.js process and underlying system.

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

## Quick answers

**Is CVE-2026-92935 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-92935 being exploited in the wild.

**How severe is CVE-2026-92935?** Critical severity, with a CVSS score of 9, published 17 September 2026.

**Which products and versions are affected?** vm2 (npm) >= 3.11.4, <= 3.11.6, SEMVER:introduced=3.11.4,fixed=3.11.7.

**Is there a fix for CVE-2026-92935?** Yes. vm2 (npm): upgrade to 3.11.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-92935 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-92935?** Check whether you run vm2 (npm) 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

- vm2 (npm): upgrade to 3.11.7 or later

  ```sh
  npm install vm2@3.11.7
  ```


## Technical details

The vulnerability is a logic error in the nesting guard that checks `hasRealRequireConfig`. The guard uses `typeof requireOpts === 'object' && requireOpts !== null` to validate that a require configuration is present, but arrays satisfy this condition even though they are not valid VMRequire configuration objects. When an array is passed as the require option, `makeResolverFromLegacyOptions()` destructures it, leaving builtin and external options undefined, which then merges with NESTING_OVERRIDE and returns a resolver containing only vm2's internal nesting loader. An attacker executing JavaScript in a NodeVM with `{nesting: true, require: []}` can require the host vm2 module, instantiate a new NodeVM with an attacker-controlled builtin allowlist (e.g., child_process), and execute arbitrary shell commands. The outer NodeVM's builtin restrictions do not constrain the inner NodeVM. The vulnerability requires nesting to be explicitly enabled and the require option to be set to an array; it is fixed in version 3.11.7.

## Affected products

- vm2 vm2 >=3.11.4, <=3.11.6

## Identifiers

- CVE-2026-92935
- GHSA-8hr7-r645-pc6w

## Timeline

- 2026-08-24: disclosed
- 2026-08-14: patched: Fix committed; 3.11.7 released

## References

- [https://github.com/patriksimek/vm2/commit/54b54b74a382577f0bcd0538c5bf99acdcd7f53b](https://github.com/patriksimek/vm2/commit/54b54b74a382577f0bcd0538c5bf99acdcd7f53b)
- [https://github.com/patriksimek/vm2/security/advisories/GHSA-8hr7-r645-pc6w](https://github.com/patriksimek/vm2/security/advisories/GHSA-8hr7-r645-pc6w)

## 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)
