# CVE-2026-92946: vm2 remote code execution in NodeVM require.external

Source: https://junglewise.ai/threats/cve-2026-92946-vm2-remote-code-execution-in-nodevm-require-external  
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-92946 · Severity: critical · CVSS 10 · Published 2026-09-17

vm2 is a sandbox library that allows Node.js code to execute untrusted scripts in an isolated environment. When the require.external option is enabled without explicitly setting require.root to exclude node_modules, attackers can bypass the sandbox entirely and execute arbitrary commands on the host system. This vulnerability affects applications using vm2's documented examples, making it a critical risk for any service running user-supplied code.

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

## Quick answers

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

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

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

**Is there a fix for CVE-2026-92946?** 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-92946 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-92946?** 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 sandbox escape via insecure defaults (CWE-1188) in vm2's require.external feature. When require.external is true and require.root is not explicitly set, the resolver's isPathAllowed() method returns true (unrestricted access), and the context parameter defaults to 'host', causing files to be loaded via the real Node.js require() instead of the vm2 sandbox. Attackers can require() vm2's own installed package from node_modules, instantiate an unrestricted NodeVM instance, and execute arbitrary host OS commands via child_process. The vulnerability is reachable when the require.external option is enabled in the NodeVM constructor without a properly configured root parameter. A fix is available in version 3.11.7 and later.

## Affected products

- Patriksimek vm2 < 3.11.7

## Identifiers

- CVE-2026-92946
- GHSA-j3hm-6rg5-mchv

## Timeline

- 2026-08-24: disclosed
- 2026-09-17: patched: version 3.11.7

## References

- [https://github.com/patriksimek/vm2/security/advisories/GHSA-j3hm-6rg5-mchv](https://github.com/patriksimek/vm2/security/advisories/GHSA-j3hm-6rg5-mchv)
- [https://www.vulncheck.com/advisories/vm2-before-3.11.7-remote-code-execution-via-require-external](https://www.vulncheck.com/advisories/vm2-before-3.11.7-remote-code-execution-via-require-external)

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