CVE-2026-24781: vm2 inspect Function Sandbox Escape
- Vendor
- Vm2 Project
CVE-2026-24781 is a sandbox escape vulnerability in vm2, a Node.js library for executing untrusted JavaScript, affecting versions before 3.11.0. Node.js inspect behavior can unwrap proxies and expose internal vm2 proxy handlers and raw host objects. Attacker-controlled sandbox code can reconstruct handler classes and establish a cross-realm read/write channel that bypasses vm2's proxy bridge, enabling arbitrary command execution on the host. The documented exploit uses Buffer inspection behavior to leak handler internals. Version 3.11.0 fixes the vulnerability.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation breaks the isolation boundary between sandboxed JavaScript and the hosting Node.js process. An attacker can execute arbitrary code and operating-system commands with the hosting process's privileges, potentially accessing sensitive data and credentials, modifying application or host resources, and disrupting services. Exploitation does not inherently grant privileges beyond those held by the hosting process.
Mitigation
If you can’t patch tonight, do this now.
No vulnerability-specific workaround is specified in the advisory. Until patched, stop executing attacker-controlled JavaScript in affected vm2 instances. Do not rely on vm2 as the sole security boundary; use independently enforced process-, container-, or VM-level isolation with restricted privileges. Node.js version differences that block the documented exploit path should not be treated as a reliable mitigation.
Remediation
Patch, then assume compromise.
Upgrade vm2 to version 3.11.0 or later. The fix introduces a module-local construction token to prevent unauthorized handler construction, adds a WeakMap guard to reject handler methods invoked with forged receivers, and replaces handler prototype constructors with a sentinel that throws a VMError. Use a current supported release to address additional, separately tracked sandbox vulnerabilities.
Exploits
No public exploits tracked yet. Mallory keeps watching.
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.
References
Frequently asked questions
- Is CVE-2026-24781 exploited in the wild?
- As of Nov 5, 2026, Mallory has no reports of CVE-2026-24781 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-24781?
- Yes. As of Nov 5, 2026, Mallory has reports of a public exploit for CVE-2026-24781.
- Is there a patch for CVE-2026-24781?
- Upgrade vm2 to version 3.11.0 or later. The fix introduces a module-local construction token to prevent unauthorized handler construction, adds a WeakMap guard to reject handler methods invoked with forged receivers, and replaces handler prototype constructors with a sentinel that throws a VMError.
- What products are affected by CVE-2026-24781?
- Vm2 Project Vm2.
- How severe is CVE-2026-24781?
- CVE-2026-24781 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 1.2% (68th percentile) as of Nov 5, 2026.
Recent activity
19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.