CVE-2026-47209: vm2 Sandbox Escape via Proxy Receiver Parameter Bypass
vm2 is a sandbox for Node.js that isolates untrusted code. A bug in how it handles property assignments on inherited objects allows attackers to bypass its security boundaries and write dangerous properties to the host system. Instead of properly creating properties on child objects, the sandbox writes directly to the host, letting malicious code inject capabilities that could compromise the Node.js runtime itself.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 8.6 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
- Weaknesses (CWE)
- CWE-693
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-12 / 2026-06-17
NVD description (verbatim)
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the BaseHandler.set trap in bridge.js (line 1231) ignores the receiver parameter and unconditionally writes to the host target object. Per the Proxy set trap specification, when receiver !== proxy (e.g., when a child object inherits from the proxy via Object.create), the property assignment should create an own property on the receiver, not on the proxy target. The current implementation always calls otherReflectSet(object, key, value) against the host target, causing all inherited property writes to leak through to the host object. This bug provides an alternative attack vector for writing dangerous cross-realm Symbol keys (e.g., nodejs.util.promisify.custom) to host objects, bypassing any future per-trap isDangerousCrossRealmSymbol guard on the direct set path. This issue has been patched in version 3.11.4.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The BaseHandler.set trap in bridge.js fails to respect the Proxy specification's receiver parameter. When a child object inherits from a proxied object via Object.create and code assigns a property on that child, the trap unconditionally writes to the host target rather than creating an own property on the receiver. This allows an attacker to write cross-realm Symbol keys (such as nodejs.util.promisify.custom) to host objects, defeating the sandbox's isolation model. The vulnerability exists because the implementation calls otherReflectSet against the host target without checking whether receiver !== proxy, which the Proxy spec mandates as the condition for creating properties on the receiver instead.
Business impact
Organizations running vm2 to sandbox untrusted Node.js code face a direct compromise of the host runtime. An attacker can inject malicious symbols into host objects that alter the behavior of core Node.js utilities, potentially leading to code execution or credential theft on the system running the sandbox. This is particularly critical for platforms using vm2 for multi-tenant code execution, serverless runtimes, or REPL-like services where isolation is the primary security control.
Affected systems
vm2 versions prior to 3.11.4 are affected. The vulnerability applies to any deployment running an older version that processes untrusted code within the sandbox. There are no vendor products listed in the CVE record; vm2 is an open-source project maintained independently. Users should check their node_modules or package-lock files to determine their current version.
Exploitability
Exploitability is high. No authentication or user interaction is required—an attacker only needs to execute arbitrary code inside the vm2 sandbox (the threat model vm2 is designed to handle). The network attack vector and low attack complexity mean that any compromise of an application using vm2 to run untrusted code directly enables this attack. Proof-of-concept techniques leveraging Object.create and property assignment are straightforward for an attacker with sandboxed code execution.
Remediation
Upgrade vm2 to version 3.11.4 or later. This patch fixes the BaseHandler.set trap to properly respect the receiver parameter and create properties on inherited objects rather than leaking them to the host. After patching, verify that your application's dependency tree reflects the updated version and re-deploy to all environments.
Patch guidance
Update the vm2 package in your package.json to 3.11.4 or a newer version. Run `npm update vm2` or `yarn upgrade vm2` and thoroughly test your application with the patched version before rolling out to production. Pay special attention to any code that creates child objects from sandbox contexts or relies on property inheritance patterns. If you maintain a lock file, ensure it is regenerated and committed.
Detection guidance
Monitor for unexpected Symbol properties appearing on host objects that should only exist within the sandbox context. Log and alert on attempts to modify nodejs.util.promisify.custom or other well-known cross-realm symbols at runtime. In development, enable detailed error logging in the sandbox to catch property assignment attempts to inherited objects. Ensure your monitoring covers changes to core Node.js prototype chains and global object properties.
Why prioritize this
This is a HIGH severity vulnerability (CVSS 8.6) because it provides a direct sandbox escape for untrusted code execution scenarios—the core threat model vm2 is designed to prevent. The integrity impact is high, the attack requires no privileges or user interaction, and exploitation is achievable by anyone able to inject code into the sandbox. Organizations should treat this as a critical security update, particularly if vm2 is used to run user-supplied scripts or in multi-tenant environments.
Risk score, explained
The CVSS 3.1 score of 8.6 reflects a network-accessible vulnerability with low attack complexity and high impact to system integrity. The scope is changed (sandbox → host), meaning the attacker can affect resources beyond the security scope of the vulnerable component. There is no confidentiality impact and no availability impact, but the ability to write dangerous symbols to the host object is a direct integrity violation that undermines the sandbox's core purpose.
Frequently asked questions
If our application uses vm2 but we don't execute untrusted code in it, are we affected?
This vulnerability only poses a risk if you execute code of unknown or untrusted origin within the vm2 sandbox. If vm2 is part of your architecture but only runs trusted, internal code, the risk is lower. However, we recommend upgrading anyway to maintain a clean security posture and avoid accidental exposure if code paths change.
Does this vulnerability allow full code execution on the host machine?
It enables injection of dangerous cross-realm symbols that can alter Node.js runtime behavior, which can lead to code execution or information disclosure depending on the environment and how those symbols are used. It is not a direct remote code execution but rather a sandbox escape that gives an attacker expanded capabilities on the host process.
Can we work around this without upgrading vm2?
A workaround is not practical for a sandbox bypass. The vulnerability is in the core property assignment trap; patching the code yourself would require replicating the fix in 3.11.4. We strongly recommend upgrading rather than attempting a workaround.
What should we do if we cannot upgrade immediately?
Immediately audit which systems run vm2 with untrusted code, isolate them from sensitive data and systems, and apply network segmentation to limit lateral movement. Implement enhanced logging and monitoring for Symbol property manipulation. Create an upgrade plan with a target timeline measured in days, not weeks, and test the upgrade in a staging environment in parallel.
This analysis is based on the CVE record and vendor guidance available as of the publication date. CVSS scores and severity ratings are provided by NIST and the CVE program. Actual risk depends on your specific deployment, network architecture, and threat model. Always verify patch applicability against the official vm2 repository and your organization's change management procedures before deploying updates. No exploit code or weaponized proof-of-concept is provided; this document is for defensive security purposes only. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-48649HIGHAndroid Local Privilege Escalation via Permission Bypass
- CVE-2025-48652HIGHAndroid MDM Bypass Logic Flaw – HIGH Severity Privilege Escalation
- CVE-2026-0045HIGHAndroid Bluetooth Bonding Bypass Privilege Escalation
- CVE-2026-0077HIGHAndroid ActivityRecord Privilege Escalation Vulnerability
- CVE-2026-0087HIGHAndroid App Link Hijacking via Domain Verification Logic Error
- CVE-2026-0097HIGHAndroid Bluetooth Pairing Logic Error Allows Silent Privilege Escalation
- CVE-2026-11170HIGHChrome Chromoting Linux Privilege Escalation (CVSS 8.1)
- CVE-2026-11248HIGHChrome Navigation Bypass in Google Lens