CVE-2026-92951: vm2 module allowlist bypass via substring matching

CVE-2026-92951 · Severity: critical · CVSS 9.9 · Published 2026-09-17

vm2 is a popular sandbox library used to safely execute untrusted JavaScript code in a Node.js environment while restricting access to system modules and external packages. The vulnerability allows attackers to bypass package restrictions by requesting a package name that contains an allowlisted substring (e.g., requesting "evil-left-pad" when only "left-pad" is allowed), leading to arbitrary code execution in the host context outside the sandbox.

Technologies: vm2 (npm). Vendors: npm.

Quick answers

Is CVE-2026-92951 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-92951 being exploited in the wild.
How severe is CVE-2026-92951?
Critical severity, with a CVSS score of 9.9, 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-92951?
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-92951 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-92951?
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
    npm install vm2@3.11.7

Technical details

The vulnerability is an authorization bypass in NodeVM's external package allowlist mechanism. vm2 generates a regular expression from the allowlist but fails to anchor it to package-name boundaries, performing a substring match instead of an exact match. An attacker can request a colliding package name containing an allowlisted substring; if that colliding package exists in a path resolvable by the custom resolver, vm2 will load and execute it in the host context (when context: 'host' is configured), bypassing sandbox restrictions. This requires the colliding package to already be present in a resolvable path or for the application's dependency workflow to place it there. Patched in version 3.11.7.

Affected products

  • patriksimek vm2 before 3.11.7

Identifiers

  • CVE-2026-92951
  • GHSA-c48m-32m9-vx93

Timeline

  • 2026-08-24: disclosed
  • 2026-09-17: advisory
  • 2026-09-17: patched: Fixed in version 3.11.7

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.