# CVE-2026-100721: vm2 authorization bypass in NodeVM external-module resolver

Source: https://junglewise.ai/threats/cve-2026-100721-vm2-before-3-12-2-contains-an-authorization-bypass-in-the-nodevm  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-27. Updated: 2026-09-27  
License: CC BY 4.0 with a link back

CVE-2026-100721 · Severity: critical · CVSS 10 · Published 2026-09-27

vm2 is a library that runs untrusted JavaScript code in isolated sandboxes. When configured to allow external Node.js modules via a custom resolver, attackers can exploit a path-matching flaw to load non-allowlisted sibling modules, breaking out of the sandbox and executing arbitrary code in the host process. This allows complete compromise of applications that use vm2 to safely execute untrusted scripts.

Technologies: [vm2 (npm)](https://junglewise.ai/threats/technologies/vm2), [Patrik Simek Vm2](https://junglewise.ai/threats/technologies/patrik-simek-vm2). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Patrik Simek](https://junglewise.ai/threats/vendors/patrik-simek).

## Quick answers

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

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

**Which products and versions are affected?** vm2 (npm) <= 3.12.1, SEMVER:introduced=0,fixed=3.12.2; Patrik Simek Vm2 before 3.12.2.

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

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

**Am I affected by CVE-2026-100721?** Check whether you run vm2 (npm) or Patrik Simek Vm2 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.12.2 or later

  ```sh
  npm install vm2@3.12.2
  ```


## Technical details

The vulnerability exists in LegacyResolver.isPathAllowedForModule in lib/resolver-compat.js, which uses a string prefix check (startsWith) instead of enforcing path boundaries when authorizing require statements. Guest code can therefore access sibling packages (e.g., `foo2`) that share a path prefix with allowlisted modules (e.g., `foo`), bypassing the external-module allowlist. The loaded module's top-level code executes in the host context before sandbox wrapping is applied, enabling arbitrary code execution.

## Affected products

- Patrik Simek vm2 before 3.12.2

## Identifiers

- CVE-2026-100721
- GHSA-5h3f-q97h-ccvc

## Timeline

- 2026-09-27: disclosed: CVE-2026-100721 published
- 2026-08-22: patched: Fix committed to address path boundary checking in resolver

## References

- [https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72](https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72)
- [https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164](https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164)

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