CVE-2026-92937: vm2 3.11.6 Remote Code Execution via Promise call/apply
vm2 3.11.6 is vulnerable to a sandbox escape leading to remote code execution in the host Node.js process. The fix for GHSA-m283-3h24-438v is incomplete: the bridge gate at lib/bridge.js:1624 identity-checks only the direct call target when deciding whether to rebuild/sanitise a rejected host Promise value. Registering the rejection handler through Function.prototype.call or .apply indirection (e.g., p.then.call(p, undefined, cb)) makes the intercepted target host Function.prototype.call, so the sanitiser never runs and the raw host error reaches sandbox code with its own properties intact. If an embedder exposes a host-realm Promise to the sandbox (an async host function bridged via the sandbox option, or a NodeVM external module's async method) and that Promise rejects with an Error carrying a non-primitive own property referencing a host object (for example err.detail = process), untrusted code in the sandbox obtains a fully functional proxy to that host object and can execute arbitrary commands with the privileges of the host process (e.g., e.detail.mainModule.require('childprocess').execSync(...)). The direct p.then(undefined, cb), bind, and Reflect.apply forms are correctly sanitised. Fixed in vm2 3.11.7.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
vm2to a version that resolves this vulnerability.Fixed in 3.11.7Patch GHSA-m283-3h24-438v
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments are exposed when vm2 bridges a host-realm Promise into untrusted sandbox code, such as through an async host function supplied in the sandbox option or an async method in a NodeVM external module. Exploitation additionally requires that the Promise reject with an Error containing a non-primitive own property that references a host object.
Does an attacker need credentials or user interaction to exploit this?
No. The supplied vector indicates network-reachable, low-complexity exploitation with no privileges or user interaction required, provided the application exposes the required bridged Promise and rejection behavior to attacker-controlled sandbox code.
What rejection-handler patterns are affected?
The affected path registers a rejection handler through Function.prototype.call or apply indirection, such as p.then.call(p, undefined, cb). Direct p.then(undefined, cb), bind, and Reflect.apply forms are described as correctly handled.
What is the impact if exploitation succeeds?
Sandbox code can obtain a functional proxy to a host object exposed through an Error property and execute arbitrary commands with the privileges of the host Node.js process. The stated impact includes complete confidentiality, integrity, and availability compromise.