Skip to main content

CVE-2026-92937 — Vulnerability in vm2 — CVE Details

CRITICAL

vm2: GHSA-m283-3h24-438v fix bypass leads to host RCE via call/apply indirection

Published October 1, 2026Updated October 1, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.20%). Schedule for your next planned update.

Does your project use an affected vm2 version?

Paste your package-lock.json to check it for CVE-2026-92937 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my package-lock.json

Summary

Summary

Untrusted JavaScript run by vm2 can escape the sandbox and execute arbitrary commands in the host Node.js process when an embedder-exposed host Promise rejects. This is an incomplete fix for GHSA-m283-3h24-438v: the advisory's capability-bearing rejection rebuild runs only through this direct Promise-handler path, so call/apply indirection bypasses the protection it introduced. The bridge sanitises host rejection values before sandbox callbacks run, but the gate at lib/bridge.js:1624 identity-checks only the direct call target. Registering the rejection handler through Function.prototype.call indirection, 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 the sandbox (lib/bridge.js:1639) without the rebuild that strips host references carried by its own properties (lib/setup-sandbox.js:2104). A rejection error whose own property references a powerful host object, for example err.detail = process, therefore reaches sandbox code as a fully functional proxy, and e.detail.mainModule.require('child_process').execSync(...) executes with host privileges. The .apply form and a stacked call.call behave identically.

PoC

Save as poc.js and run node poc.js:

const { VM } = require('vm2');
const vm = new VM({ sandbox: {
  fetchUser: async () => {
    const err = new Error('db connection failed');
    err.detail = process; // embedder-attached host reference
    throw err;
  },
}});
vm.run(`
  const p = fetchUser(1);              // proxy of the host Promise
  p.then.call(p, undefined, (e) => {   // .call indirection skips the sanitiser
    e.detail.mainModule.require('child_process')
      .execSync('echo vm2-escape-proof > /tmp/poc.proof');
  });
`);

Observed output

$ cat /tmp/poc.proof
vm2-escape-proof

Registering the same callback directly, p.then(undefined, cb), strips detail and no command runs; the bind and Reflect.apply forms are sanitised as well, isolating the bypass to call and apply indirection.

Impact

Any deployment that evaluates attacker-controlled code with vm2 and exposes a host-realm Promise to the sandbox is affected: an async host function bridged through the sandbox option, or a NodeVM external module's async method. If that Promise rejects with an Error carrying a non-primitive own property that references a host object, a diagnostic pattern the vm2 codebase itself documents as routine for Node libraries (lib/setup-sandbox.js:1877), a single submission yields arbitrary command execution in the host process with the host account's privileges, including file read and write, process spawning, and network access. In a multi-tenant service evaluating untrusted code, one submission compromises the worker process and every tenant it serves.

Advisory Timeline

  • First published October 1, 2026 (56 days ago).
  • Last revised October 1, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update vm2 to 3.11.7 or later
npm install vm2@3.11.7

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageFixed In
vm2 npm · Affected: 3.11.63.11.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-693
    Protection Mechanism FailureMITRE
  • CWE-94
    Code InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2026-92937?
vm2: GHSA-m283-3h24-438v fix bypass leads to host RCE via call/apply indirection. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2026-92937?
CVE-2026-92937 affects vm2. It has a 1.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-92937 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
1.20%
EPSS percentile: 68

This is an above-median EPSS score — 68% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-647f-g98j-qq25

Related CVEs

  • CVE-2026-24118
    CRITICAL

    VM2 Sandbox Breakout Through __lookupGetter__

  • CVE-2026-92940
    CRITICAL

    vm2 exposes host HTTPS credentials and TLS traffic through globalAgent

  • CVE-2026-92946
    CRITICAL

    vm2: NodeVM `require.external` without an explicit `require.root` grants unrestricted host filesystem access and full RCE

  • CVE-2026-47686
    CRITICAL

    VM2 has Missing Error.cause Sanitization that Enables Sandbox Escape to RCE

  • CVE-2026-47137
    CRITICAL

    vm2 has a CVE-2023-37903 patch bypass: nesting:true without explicit require still allows full RCE

  • CVE-2026-44001
    HIGH

    vm2 has a Sandbox Escape via Promise Constructor Unhandled Rejection (Process Crash DoS)

  • CVE-2026-92950
    HIGH

    vm2 CLI provides no sandbox isolation - host-realm require() is reachable from sandboxed scripts

  • CVE-2026-47135
    HIGH

    vm2 has a sandbox escape via unblocked cross-realm Symbol.for keys + missing bridge write-trap symbol checks

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json