Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker submits untrusted plugin to vm2 sandbox
-
DeliveryMalicious native library written to host disk
-
ExploitSandboxed JS calls crypto.setEngine(path)
-
ExecutionOpenSSL dlopen triggers library constructor
-
PersistNative code runs with host authority
-
ImpactFull sandbox escape and host compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Process control sanitization
|
| Exploitation Conditions | Requires ALL of: (1) vm2 NodeVM configured to allow the 'crypto' host builtin (non-default exposure); (2) the application running attacker-supplied/untrusted JavaScript inside the sandbox (vm2's core threat model); and (3) an attacker-controlled native shared library already present on the host filesystem - e.g. bundled inside an untrusted plugin package that was extracted to disk. Notably it does NOT require fs, process, module, child_process, worker_threads, vm, or inspector builtins. Limiting factors: if crypto is not exposed, or the deployment never writes attacker-controlled files to disk, exploitation is not possible; affects only vm2 3.11.3-3.11.6 (patched in 3.11.7). |
| Impact | This is a genuine high-severity issue within its threat model but its real-world urgency is gated. The vendor CVSS 4.0 vector (AV:N/AC:L/PR:L/UI:N, all impacts High, subsequent-system SC/SI/SA:H reflecting the sandbox escape) yields 9.4 - appropriate for arbitrary native code execution that breaks the vm2 isolation boundary. However, two limiting conditions temper the raw score: exploitation requires the non-default 'crypto' builtin to be explicitly allowed in the NodeVM configuration, AND requires an attacker-controlled native library (.so/.dll) to already exist on the host filesystem (e.g. bundled in an untrusted plugin package). These are not represented in the CVSS temporal/environmental metrics (all X/unset). No EPSS score, no CISA KEV listing, and no explicit public exploit are present in the provided data, so exploitation status is 'no public exploit identified at time of analysis' - the GHSA advisory may contain proof-of-concept detail but that is not confirmed here. The core threat-model assumption (an application deliberately runs untrusted JavaScript in vm2) already presumes a hostile sandbox tenant, so within that model this is a real priority; for deployments that do not expose crypto or do not accept untrusted plugin files, real risk is low. Note the vector states PR:L while the vm2 threat model effectively grants the attacker code-supply capability without traditional authentication - the 'privilege' here is really the ability to submit sandboxed code, so PR interpretation should be verified against deployment context. |
| Exploit ScenarioDerived | An application uses vm2's NodeVM to run untrusted plugins and permits the 'crypto' builtin, while an attacker's untrusted plugin package has written a malicious native library to disk. The sandboxed plugin JavaScript calls crypto.setEngine('/path/to/malicious.so'), causing OpenSSL to invoke the OS dynamic loader; the library's constructor executes native code in the host process before OpenSSL's engine-symbol validation rejects the file. No fs, process, child_process, or module access is needed. No public exploit is confirmed in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Sandbox escape and arbitrary native code execution in vm2 3.11.3 through 3.11.6 occurs when a NodeVM sandbox is configured to allow the host crypto builtin: sandboxed JavaScript can reach crypto.setEngine() and hand it a filesystem path pointing at an attacker-supplied shared library (for example one shipped inside an untrusted plugin package already unpacked to disk), which OpenSSL passes to the operating system's dynamic loader and whose constructor then executes in the host process. Exploitation needs the crypto builtin alone - fs, process, module, child_process, worker_threads, vm and inspector access are all unnecessary - and there is no public exploit code or confirmed active exploitation (no CISA KEV listing) at time of analysis, though the reporter-assigned score of 9.4 reflects the severity if those prerequisites are met. Real-world urgency is gated by deployment-specific factors: the crypto builtin must be explicitly exposed to the sandbox and the host must already contain an attacker-writable native library, so a patched release or a tightened builtin allow-list fully removes the attack surface.
RemediationAI
Upgrade vm2 to 3.11.7 or later, the vendor-released patch that closes the setEngine() escape path (see the GitHub advisory GHSA-46pr-c5wc-xffx and the VulnCheck advisory for confirmation). Where an immediate upgrade is not possible, remove 'crypto' from the NodeVM builtin allow-list so the host module is never bridged into the sandbox; this is the single most effective workaround, and its only cost is that sandboxed code loses access to host cryptographic primitives and must be given a vetted pure-JS alternative. In parallel, eliminate the second precondition by ensuring attacker-controlled files never land on the host filesystem in a loadable location: extract plugin or package archives into a directory the sandboxed tenant cannot write to, and mount any directory that must hold untrusted content with noexec so the dynamic loader cannot map executable code from it - the trade-off is that legitimate plugins shipping native addons will stop loading and must be installed separately by an administrator. Additional hardening for tenants where the crypto builtin truly cannot be disabled includes running the sandbox in a dedicated low-privilege process isolated by seccomp or AppArmor profiles that deny dlopen of untrusted paths, and dropping capabilities and restricting LD_LIBRARY_PATH, though these are defence-in-depth measures with operational overhead rather than substitutes for the 3.11.7 upgrade.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
vm2 is a third-party Node.js sandbox that emulates a CommonJS environment inside a separate V8 context and bridges selected host builtins into that context. When the crypto builtin is placed on the allow-list, vm2 presents the host module through a recursive read-only proxy, which blocks property reassignment but does not revoke the authority of callable exports - a fundamental limitation of proxy-based sandboxing, since invocation still happens in host-process context. The dangerous export is crypto.setEngine(), the legacy OpenSSL ENGINE binding: it accepts an engine identifier that may be a filesystem path, and OpenSSL responds by asking the OS dynamic loader to mmap and relocate the specified shared object. Because a library's ELF constructor (DT_INIT/DT_INIT_ARRAY) runs during dlopen, before OpenSSL validates that the file actually implements a usable engine, a malicious .so gains native code execution in the host process even though the final engine-symbol check fails. This maps to CWE-114 (Process Control), the class in which untrusted input influences which code the process loads and runs. The affected CPE is cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*; the scope change (S:C in our reassessment, SC/SI/SA:H in the reporter's CVSS 4.0 vector) reflects the transition from sandboxed JavaScript to host-process native execution. Note the two scoring inputs diverge on privileges - the reporter's CVSS:4.0 vector carries PR:L while our reassessment uses PR:N - but both agree the requirement is untrusted JavaScript running in the NodeVM with the crypto builtin available, not conventional login credentials.
Know when Vm2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
AC:H because it needs the non-default crypto builtin plus an attacker native library already on disk; PR:N as the vm2 model grants code-submission without auth; S:C for the sandbox escape with full host code execution.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 3.11.3 through 3.11.6 exposes the host Node.js crypto module to a NodeVM sandbox when the crypto builtin is allowed. The module is presented via a recursive read-only proxy, but its callable exports still execute with host-process authority. Sandboxed JavaScript can therefore call crypto.setEngine() with a filesystem path to an attacker-supplied native library (for example, one bundled in an untrusted plugin package already written to disk); OpenSSL asks the operating-system dynamic loader to load the file, and the library's constructor executes native code in the host process before engine-symbol validation rejects it. Exploitation requires only the crypto builtin and does not require fs, process, module, child_process, worker_threads, vm, or inspector access, resulting in a sandbox escape and arbitrary native code execution. Fixed in 3.11.7.
Blast Radius
ecosystem impact- 16 npm packages depend on vm2 (5 direct, 11 indirect)
Ecosystem-wide dependent count for version 3.11.3.
Articles & Coverage 1
Technical POC Analysis
CWE-114: Process Control.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A critical-severity sandbox escape affects the vm2 JavaScript sandbox library (versions 3.11.3 through 3.11.6), allowing code confined to a NodeVM sandbox to break out and run native code inside the host Node.js process whenever the host crypto builtin is exposed to the sandbox. Because the escape yields host-process code execution, any organization using vm2 to run untrusted or third-party plugins inherits the risk of full compromise of the hosting application and any credentials, data, or downstream systems it can reach. No public exploit code or confirmed active exploitation exists at time of analysis, so urgency is driven by whether the crypto builtin is currently exposed in your deployments.
No vendor-released patch identified at time of analysis. Interim mitigations: remove 'crypto' from the NodeVM allowed builtins list (the crypto builtin alone is sufficient for exploitation and is not required for the escape if denied), avoid exposing filesystem, module, process, child_process, worker_threads, vm, or inspector to sandboxes, run untrusted plugin code in isolated containers or low-privilege processes with no access to host libraries or secrets, and prevent untrusted plugin packages from being unpacked to host disk paths reachable by the dynamic loader.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
vm2 is an advanced vm/sandbox for Node.js. Rated critical severity (CVSS 10.0), this vulnerability is remotely exploitab
vm2 is a sandbox that can run untrusted code with Node's built-in modules. Rated critical severity (CVSS 10.0), this vul
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.
There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15,
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.
This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr
Full sandbox escape with arbitrary code execution allows remote attackers to break out of vm2's Node.js sandbox environm
Sandbox escape in vm2 for Node.js allows remote unauthenticated attackers to execute arbitrary commands on the host syst
Sandbox escape in vm2 (patriksimek/vm2) versions prior to 3.11.3 enables remote code execution on the host Node.js proce
Sandbox escape in vm2 Node.js sandbox before 3.10.2 via Promise.prototype.then/catch callback sanitization bypass. PoC a
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 9.8
The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the We
EUVD-2026-81589
GHSA-46pr-c5wc-xffx
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB