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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| patriksimek | vm2 | 3.11.4 – < 3.11.7 | 3.11.7 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
CompleteTech-Security/vm2-nesting-check ★ 0 · Oct 23, 2026
Offline vm2 evidence checker for CVE-2026-92935. Sandbox package and nesting evidence. Standalone Python; JSON/CSV/HTML reports; no exploit payloads.
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | vm2 | >= 3.11.4, < 3.11.7 | 3.11.7 | GHSA-8hr7-r645-pc6w |
Advisories 1
- WID-SEC-2026-2997 vm2: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 27, 2026
References
- GitHub Security Advisory (GHSA-8hr7-r645-pc6w) vendor-advisory
- Patch Commit patch
- VulnCheck Advisory: vm2 NodeVM Remote Code Execution via Array-Shaped Require third-party-advisory