# CVE-2026-47137: patriksimek vm2 sandbox escape via configuration bypass

Source: https://junglewise.ai/threats/cve-2026-47137-patriksimek-vm2-sandbox-escape-via-configuration-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-12. Updated: 2026-06-12  
License: CC BY 4.0 with a link back

CVE-2026-47137 · Severity: critical · CVSS 10 · Published 2026-06-12

vm2 is a popular tool used to safely run untrusted code in Node.js environments. A flaw in how it handles security settings allows an attacker to bypass intended restrictions and escape the secure "sandbox." If exploited, this allows the attacker to run unauthorized commands on the underlying server, potentially leading to full system takeover or data theft.

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

## Quick answers

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

**How severe is CVE-2026-47137?** Critical severity, with a CVSS score of 10, published 12 June 2026.

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

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

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

**Am I affected by CVE-2026-47137?** 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.4 or later

  ```sh
  npm install vm2@3.11.4
  ```


## Technical details

A sandbox escape vulnerability exists in vm2 due to an incomplete fix for a previous security issue. The validation logic in nodevm.js used a strict equality check (options.require === false) to block insecure configurations. However, an attacker can bypass this check by omitting the 'require' option entirely, causing it to be 'undefined' during the check but later defaulting to 'false' during destructuring. This results in a configuration that allows the sandbox to access the 'vm2' module itself, which can be used as a primitive to escape the sandbox and execute arbitrary code on the host system via child_process. The issue is patched in version 3.11.4.

## Affected products

- patriksimek vm2 < 3.11.4

## Identifiers

- CVE-2026-47137
- GHSA-m4wx-m65x-ghrr

## Timeline

- 2026-05-17: patched: Initial fix for the bypass committed.
- 2026-06-12: advisory: CVE-2026-47137 published.

## References

- [https://github.com/patriksimek/vm2/commit/01a7552add345d5a6862623884e6b79a85bf0568](https://github.com/patriksimek/vm2/commit/01a7552add345d5a6862623884e6b79a85bf0568)
- [https://github.com/patriksimek/vm2/commit/86ab819f202c3a8dad88cef5705f2e416c5188d7](https://github.com/patriksimek/vm2/commit/86ab819f202c3a8dad88cef5705f2e416c5188d7)
- [https://github.com/patriksimek/vm2/releases/tag/v3.11.4](https://github.com/patriksimek/vm2/releases/tag/v3.11.4)
- [https://github.com/patriksimek/vm2/security/advisories/GHSA-m4wx-m65x-ghrr](https://github.com/patriksimek/vm2/security/advisories/GHSA-m4wx-m65x-ghrr)

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