Junglewise Threat Intelligence

CVE-2026-93606: vm2 sandbox escape via Promise Symbol.species hijack

CVE-2026-93606 · Severity: critical · CVSS 10 · Published 2026-09-18

Technologies: vm2 (npm). Vendors: npm.

Executive brief

vm2 is a popular npm library that runs untrusted JavaScript code in an isolated sandbox environment. This vulnerability allows sandboxed code to break out of the isolation and execute arbitrary code on the host system by manipulating how the library handles rejected promises. An attacker can gain full control over the host machine, including executing system commands and accessing sensitive data.

Technical details

The vulnerability is a sandbox escape in vm2's promise rejection sanitizer. When an embedder exposes a host-realm Promise to the sandbox, vm2 attempts to sanitize rejection values via lib/bridge.js functions (hostPromiseSanitizeReject, makeSanitizedPromiseCallback, normalizeHostPromiseCallbacks). However, two gaps combine to bypass this: (1) the sandbox-side Symbol.species/.then neutralization is installed only on the sandbox intrinsic Promise.prototype, never applying to host Promises; (2) the rejection sanitizer only wraps then/catch slots when they hold a function—calling p.then() with no onRejected handler causes V8 to substitute its internal Thrower, which re-throws the raw host rejection. By hijacking p.constructor[Symbol.species] on the host Promise, an attacker captures V8's raw resolve/reject closures and receives an unsanitized bridge proxy of the host object, completely bypassing handleException and hostPromiseSanitizeReject. If the rejection value is host-pivotable (e.g., the host process object), this results in host RCE. The fix is available in version 3.12.1.

Affected products

  • npm vm2 3.12.0 and earlier

Timeline

  • 2026-09-18: disclosed: CVE-2026-93606 published
  • 2026-09-18: patched: Fix released in version 3.12.1

References

Related threats