vm2 sandbox escape via __lookupGetter__
CVE-2026-24118 is a critical sandbox breakout vulnerability in the vm2 Node.js sandbox library affecting versions prior to 3.11.0, including versions up to and including 3.10.4. The flaw allows attacker-supplied JavaScript executed inside a vm2 sandbox to escape the intended isolation boundary and reach host-context functionality. Supporting reporting attributes the escape to inconsistent context bridging involving lookupGetter, Buffer.apply, and prototype-chain traversal, which can expose host-side objects up to Object.prototype, then the host Object constructor, and ultimately the host Function constructor. Once the host Function constructor is reachable, arbitrary code can be created and executed in the host context, defeating vm2's sandbox model. Public descriptions note that exploitation can be used to invoke host capabilities such as child_process and execute arbitrary operating system commands. The issue was patched in vm2 version 3.11.0.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a small self-contained JavaScript proof-of-concept for escaping a vulnerable vm2 sandbox in a local lab environment. It contains two code files: lab.js, which creates an Express-based test service exposing POST /execute on localhost:3000 and runs supplied code inside a vm2 VM configured with sandbox {}, timeout 4000, and eval disabled; and exploit.js, which sends a crafted JavaScript payload to that endpoint using fetch. The exploit’s core capability is sandbox escape leading to host-side arbitrary command execution. The payload creates an Error object, sets err.name to a Symbol, invokes an async function returning err.stack, and in the promise rejection path accesses e.constructor.constructor to recover the host Function constructor. It then executes host JavaScript that imports child_process via process.mainModule.require('child_process') and runs shell commands on the underlying system. On success it prints markers plus the output of whoami and id, creates a timestamped proof file in /tmp, and appends an exploitation log entry to /tmp/vm2_lab.log. The repository is not part of a larger exploit framework; it is a standalone operational PoC with a hardcoded target and payload. The README and license are disclaimers only. The exploit is aimed at a deliberately vulnerable local Node.js lab using vm2 version 3.10.1. It is not merely a detector: it actively exploits the sandbox and demonstrates post-escape command execution. A commented section in exploit.js also shows how the payload could be replaced with a bash reverse shell callback to 127.0.0.1:4444, indicating the exploit can be adapted beyond simple proof-file creation.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A critical vm2 sandbox escape vulnerability that exploits __lookupGetter__ behavior to achieve host remote code execution.
A critical vm2 sandbox escape vulnerability via __lookupGetter__ that can lead to arbitrary code execution on the host.
A critical vm2 sandbox escape vulnerability that allows attackers to break out of a restricted JavaScript runtime and execute arbitrary commands on the host operating system as the Node.js application user.
A sandbox breakout vulnerability in vm2 for Node.js that allows attackers to escape the VM2 sandbox and execute arbitrary commands on the host system.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.