vm2 sandbox escape on Node.js 26 through stale PromiseThenLookupChain

Severity: critical · CVSS 9.8 · Published 2026-09-17

vm2 is a JavaScript sandbox that isolates untrusted code execution in Node.js. On Node.js 26, attackers can escape the sandbox by exploiting a flaw in how Promise.prototype.finally() interacts with V8's internal protector, gaining arbitrary code execution in the host realm with access to sensitive objects like the process object.

Technologies: vm2 (npm), Vm2. Vendors: npm.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Critical severity, with a CVSS score of 9.8, published 17 September 2026.
Which products and versions are affected?
vm2 (npm) >= 3.10.2, <= 3.11.6; Vm2 3.10.2 through 3.11.6.
Is there a fix for This vulnerability?
A patch was published on 2026: Version 3.11.7 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run vm2 (npm) or 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.

Technical details

vm2 versions 3.10.2–3.11.6 fail to protect against sandbox escape on Node.js 26/V8 14.6 due to a stale PromiseThenLookupChain protector. An attacker creates an async function that returns a Promise with an attacker-controlled constructor[Symbol.species]; Promise.prototype.finally() bypasses vm2's wrapper protections by using an internal InvokeThen fast path that trusts the stale protector. This allows the attacker to reach the host Function constructor and process object. The vulnerability requires only network access to supply malicious code to vm2; no authentication or user interaction is needed. Patched in version 3.11.7.

Affected products

  • vm2 3.10.2 through 3.11.6

Timeline

  • 2026-09-17: disclosed
  • 2026: patched: Version 3.11.7

References

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