CVE-2026-92939 — Vulnerability in vm2 — CVE Details
vm2 crypto builtin loads attacker native code through setEngine
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.62%). Schedule for your next planned update.
Does your project use an affected vm2 version?
Paste your package-lock.json to check it for CVE-2026-92939 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
vm2 3.11.6 exposes the host crypto module to a NodeVM when that single builtin is allowed. The module is presented through a read-only bridge, but its functions still execute with host-process authority. crypto.setEngine() accepts a filesystem path and asks OpenSSL to dynamically load the referenced native library.
An attacker whose untrusted plugin package contains a native library can therefore load that library into the host process by calling crypto.setEngine() from sandboxed JavaScript. The native library's constructor executes before OpenSSL finishes validating whether the file is a usable engine. Consequently, even the expected ERR_CRYPTO_ENGINE_UNKNOWN exception occurs only after arbitrary native code has already run.
The exploit requires only the crypto builtin. It does not require fs, process, module, child_process, worker_threads, vm, inspector, unrestricted builtins, or vm2 nesting.
Details
The vulnerable boundary is the generic builtin loader. Builtins that are not specially wrapped or classified as dangerous are imported in the host realm and exposed through a recursive read-only proxy:
builtins.set(key, special ? special : vm => vm.readonly(hostRequire(key)));
Read-only prevents sandbox code from assigning properties on the module object. It does not reduce the authority of callable exports. Calls are forwarded to the original host function with bridge values converted back to host values.
The crypto module includes this callable export:
crypto.setEngine(enginePath)
When enginePath names a dynamic library, OpenSSL loads that file into the current process. Operating-system dynamic loaders execute library constructors as part of loading. Engine-symbol validation happens afterward. A file does not have to become a functional cryptographic engine for its constructor to execute.
The resulting exploit flow is:
attacker supplies an untrusted plugin package containing a native library
-> host executes the plugin in NodeVM with only crypto allowed
-> plugin calls crypto.setEngine(pathToBundledLibrary)
-> vm2 forwards the call to the host crypto module
-> OpenSSL asks the operating-system loader to load the library
-> the library constructor executes native code in the host process
-> OpenSSL may then reject the file, but host compromise has already occurred
This is different from merely granting JavaScript filesystem access. A plugin system commonly has to place an untrusted package on disk before running its JavaScript. The native file can therefore already exist inside that package even when the sandbox denies fs and all process-execution builtins. Allowing crypto for hashing or signature verification unexpectedly turns that inert package file into a native-code execution primitive.
PoC
The attached PoC is local and harmless. Its native library constructor creates a marker file; it does not spawn a process, open a network connection, or modify any other file.
-
Install Node.js with OpenSSL engine support, a C compiler, and npm.
-
In the attached
pocdirectory, install the exact affected package:npm install --ignore-scripts -
Build the marker library.
On macOS:
cc -dynamiclib -O2 -o probe-engine.dylib engine_probe.c node poc.js ./probe-engine.dylibOn Linux:
cc -shared -fPIC -O2 -o probe-engine.so engine_probe.c node poc.js ./probe-engine.so -
A vulnerable result contains all of the following:
- the sandbox configuration lists only
cryptoas an allowed builtin; crypto.setEngine()reportsERR_CRYPTO_ENGINE_UNKNOWNor returns;vm2-setengine-native-marker.txtexists afterward;- the marker contains
VM2_SETENGINE_NATIVE_CODE_EXECUTED.
- the sandbox configuration lists only
The exception is not a negative result. The marker proves that the native constructor ran before engine validation failed.
Impact
This is a sandbox escape to arbitrary native code execution. The code runs with the operating-system identity and privileges of the Node.js host process, outside all vm2 language and module restrictions.
An attacker can replace the marker-only constructor with native code that:
- reads application secrets, environment variables, credentials, and files available to the host user;
- modifies application data or executable files and establishes persistence;
- accesses internal services using the host's network identity;
- steals other tenants' data from the same process;
- terminates or corrupts the host process; and
- executes arbitrary operating-system actions permitted to the host account.
The realistic affected workflow is a plugin, automation, notebook, or multi-tenant code runner that stores attacker-supplied package contents on disk and runs the package's JavaScript in NodeVM while allowing crypto. The attacker does not need the sandbox to expose a file-write or command-execution module.
Advisory Timeline
- First published October 1, 2026 (56 days ago).
- Last revised October 1, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install vm2@3.11.7
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| vm2 npm · Affected: All versions | 3.11.7 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-114
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
References
- https://github.com/patriksimek/vm2/security/advisories/GHSA-46pr-c5wc-xffxWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-92939ADVISORY
- https://github.com/patriksimek/vm2/commit/aa146a77f859325e079f3bfbfe6d8309af483daaWEB
- https://github.com/patriksimek/vm2PACKAGE
- https://github.com/patriksimek/vm2/releases/tag/v3.11.7WEB
- https://www.vulncheck.com/advisories/vm2-3.11.3-through-3.11.6-native-code-execution-via-crypto-setengineWEB
Frequently Asked Questions
- What is CVE-2026-92939?
- vm2 crypto builtin loads attacker native code through setEngine. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
- How do I check if my project is affected by CVE-2026-92939?
- CVE-2026-92939 affects vm2. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-92939 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 43.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-44007CRITICAL
vm2 NodeVM `nesting: true` bypasses `require: false` allowing sandbox escape and arbitrary OS command execution
- CVE-2026-92935CRITICAL
vm2: NodeVM nesting guard accepts array-shaped require and permits host RCE
- CVE-2026-43999CRITICAL
vm2 has a NodeVM builtin allowlist bypass via `module` builtin's `Module._load` that allows sandbox escape
- CVE-2026-92941CRITICAL
vm2 NodeVM can replace the host process TLS trust store
- CVE-2026-22709CRITICAL
vm2 has a Sandbox Escape
- CVE-2026-44008CRITICAL
vm2 has sandbox breakout via `neutralizeArraySpeciesBatch`
- CVE-2026-44009CRITICAL
vm2 has Sandbox Breakout Through Null Proto Exception
- CVE-2026-92951CRITICAL
vm2 Custom Module Resolver Can Bypass the External Package Allowlist by Loading a Colliding Host Package