CVE-2026-92939: vm2: native code exec via crypto.setEngine sandbox escape

GHSA-46pr-c5wc-xffxCRITICALPoC AVAILABLECISA: ATTEND
Published October 1, 2026
CISO Take

vm2 versions 3.11.3 through 3.11.6 let sandboxed JavaScript escape to arbitrary native code execution in the host process, but only when the `crypto` builtin is allowed in NodeVM. The sandbox forwards `crypto.setEngine()` to the host, and OpenSSL loads the attacker's bundled native library, whose constructor runs before any validation fails. The CVSS is 9.9 (scope changed), and vm2 has 3,047 downstream dependents. Exploitation likelihood is currently modest: EPSS is 0.00616 (top 52%), it is not in CISA KEV, no public exploit or Nuclei template exists, and SSVC says ATTEND. The risk is concentrated in plugin systems, AI agent code runners and notebooks that run untrusted packages with `crypto` enabled. Upgrade to vm2 3.11.7 and review every NodeVM configuration that allows `crypto`. Until then, remove `crypto` from the builtin allowlist and reject native binaries in untrusted packages.

Sources:NVDGitHub AdvisoryEPSSATLASOpenSSFvulncheck.com

What is the risk?

Severity is critical (CVSS 9.9, scope changed). The impact is sandbox escape to native code execution with the host process's privileges. Exploitation needs only low privileges: the attacker must be able to supply a plugin package containing a native library and have it run in NodeVM with `crypto` allowed. It needs no user interaction and the attack complexity is low. Real-world likelihood is lower than the score suggests. It depends on that specific, fairly common configuration (allowing `crypto` for hashing or signature checks). EPSS is 0.00616 (top 52%), there is no KEV listing, public exploit or scanner template, and SSVC says ATTEND. Exposure is elevated for multi-tenant AI agent and code-execution platforms. The OpenSSF Scorecard is 5.8/10, and 62 other CVEs in the same package indicate a history of sandbox escapes. This is a recurring risk pattern for vm2 rather than an isolated flaw.

How does the attack unfold?

Initial Access
Attacker submits an untrusted plugin package with a bundled native library to a platform that runs it in NodeVM with `crypto` allowed.
AML.T0011.001
Sandbox Escape
Sandboxed JavaScript calls `crypto.setEngine()` with the library path, and OpenSSL loads it into the host process.
AML.T0105
Execution
The library constructor runs arbitrary native code with host privileges before OpenSSL rejects the file.
Impact
Attacker steals secrets, API keys and tenant data, accesses internal services, and establishes persistence on the host.
AML.T0055

What systems are affected?

PackageEcosystemVulnerable RangePatched
Jupyter Notebooknpm>= 3.11.3, <= 3.11.63.11.7
13.5KOpenSSF 5.73.0K dependentsPushed 7d ago80% patched~74d to patchFull package profile →

Do you use Jupyter Notebook? You're affected.

How severe is it?

CVSS 3.1
9.9 / 10
EPSS
0.6%
chance of exploitation in 30 days
Higher than 50% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Moderate
Exploitation Confidence
medium
○CISA SSVC: Public PoC
○Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRLow
UINone
SChanged
CHigh
IHigh
AHigh

What should I do?

1 step
  1. 1) Upgrade vm2 to 3.11.7 or later, which carries the fix (commit aa146a7). 2) Until patched, remove crypto from the NodeVM require.builtin allowlist or replace it with a host-side wrapper exposing only the needed functions (hash, HMAC, verify) and excluding setEngine. 3) Reject or strip native binaries (.so, .dylib, .node, .dll) from untrusted plugin packages before extraction. 4) Run untrusted code in a separate OS-level sandbox (container with a seccomp profile, gVisor or microVM) with a non-root user, a read-only filesystem and minimal secrets. 5) Detection: audit the dependency tree with npm ls vm2 and SCA tooling, and grep configs for builtin: ['crypto']. Alert on crypto.setEngine calls from sandboxed code, unexpected shared-library loads in the Node process, and new files written by the Node process. 6) Treat vm2 as defense-in-depth only, not a security boundary for hostile code.

What does CISA's SSVC say?

DecisionAttend
Exploitationpoc
AutomatableNo
Technical Impacttotal

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15-Accuracy, robustness and cybersecurity
ISO 42001
A.10.3-Suppliers
NIST AI RMF
GOVERN 6.1-Policies for third-party AI and software risks
OWASP LLM Top 10
LLM03-Supply Chain

Frequently Asked Questions

What is CVE-2026-92939?

vm2 versions 3.11.3 through 3.11.6 let sandboxed JavaScript escape to arbitrary native code execution in the host process, but only when the `crypto` builtin is allowed in NodeVM. The sandbox forwards `crypto.setEngine()` to the host, and OpenSSL loads the attacker's bundled native library, whose constructor runs before any validation fails. The CVSS is 9.9 (scope changed), and vm2 has 3,047 downstream dependents. Exploitation likelihood is currently modest: EPSS is 0.00616 (top 52%), it is not in CISA KEV, no public exploit or Nuclei template exists, and SSVC says ATTEND. The risk is concentrated in plugin systems, AI agent code runners and notebooks that run untrusted packages with `crypto` enabled. Upgrade to vm2 3.11.7 and review every NodeVM configuration that allows `crypto`. Until then, remove `crypto` from the builtin allowlist and reject native binaries in untrusted packages.

Is CVE-2026-92939 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2026-92939, increasing the risk of exploitation.

How to fix CVE-2026-92939?

1) Upgrade vm2 to 3.11.7 or later, which carries the fix (commit aa146a7). 2) Until patched, remove `crypto` from the NodeVM `require.builtin` allowlist or replace it with a host-side wrapper exposing only the needed functions (hash, HMAC, verify) and excluding `setEngine`. 3) Reject or strip native binaries (.so, .dylib, .node, .dll) from untrusted plugin packages before extraction. 4) Run untrusted code in a separate OS-level sandbox (container with a seccomp profile, gVisor or microVM) with a non-root user, a read-only filesystem and minimal secrets. 5) Detection: audit the dependency tree with `npm ls vm2` and SCA tooling, and grep configs for `builtin: ['crypto']`. Alert on `crypto.setEngine` calls from sandboxed code, unexpected shared-library loads in the Node process, and new files written by the Node process. 6) Treat vm2 as defense-in-depth only, not a security boundary for hostile code.

What systems are affected by CVE-2026-92939?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, plugin/tool execution sandboxes, workflow automation platforms, code interpreter services, multi-tenant notebook runners.

What is the CVSS score for CVE-2026-92939?

CVE-2026-92939 has a CVSS v3.1 base score of 9.9 (CRITICAL). The EPSS exploitation probability is 0.62%.

What is the AI security impact?

Affected AI Architectures

agent frameworksplugin/tool execution sandboxesworkflow automation platformscode interpreter servicesmulti-tenant notebook runners

MITRE ATLAS Techniques

AML.T0010.001AI Software
AML.T0011.001Malicious Package
AML.T0105Escape to Host

Compliance Controls Affected

EU AI Act: Article 15
ISO 42001: A.10.3
NIST AI RMF: GOVERN 6.1
OWASP LLM Top 10: LLM03

What are the technical details?

Original Advisory

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: ```js 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: ```js 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: ```text 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. 1. Install Node.js with OpenSSL engine support, a C compiler, and npm. 2. In the attached `poc` directory, install the exact affected package: ```bash npm install --ignore-scripts ``` 3. Build the marker library. On macOS: ```bash cc -dynamiclib -O2 -o probe-engine.dylib engine_probe.c node poc.js ./probe-engine.dylib ``` On Linux: ```bash cc -shared -fPIC -O2 -o probe-engine.so engine_probe.c node poc.js ./probe-engine.so ``` 4. A vulnerable result contains all of the following: - the sandbox configuration lists only `crypto` as an allowed builtin; - `crypto.setEngine()` reports `ERR_CRYPTO_ENGINE_UNKNOWN` or returns; - `vm2-setengine-native-marker.txt` exists afterward; - the marker contains `VM2_SETENGINE_NATIVE_CODE_EXECUTED`. 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.

Exploitation Scenario

An attacker publishes a plugin or tool package for an AI agent or automation platform. The package contains a compiled native library and JavaScript that only requires `crypto`, which the platform allows for signature verification. The platform unpacks the package to disk and executes the JavaScript in NodeVM. The plugin calls `crypto.setEngine('./payload.so')`, and OpenSSL loads the library and runs its constructor in the host process. The attacker then reads environment variables (LLM provider keys, database credentials), queries internal vector databases and model-serving endpoints, and establishes persistence. The call throws ERR_CRYPTO_ENGINE_UNKNOWN afterwards, which can look like a harmless error in logs.

Weaknesses (CWE)

CWE-114 — Process Control: Executing commands or loading libraries from an untrusted source or in an untrusted environment can cause an application to execute malicious commands (and payloads) on behalf of an attacker.

  • [Architecture and Design] Libraries that are loaded should be well understood and come from a trusted source. The application can execute code contained in the native libraries, which often contain calls that are susceptible to other security problems, such as buffer overflows or command injection. All native libraries should be validated to determine if the application requires the use of the library. It is very difficult to determine what these native libraries actually do, and the potential for malicious code is high. In addition, the potential for an inadvertent mistake in these native libraries is also high, as many are written in C or C++ and may be susceptible to buffer overflow or race condition problems. To help prevent buffer overflow attacks, validate all input to native calls for content and length. If the native library does not come from a trusted source, review the source code of the library. The library should be built from the reviewed source before using it.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Timeline

Published
October 1, 2026
Last Modified
October 1, 2026
First Seen
October 1, 2026

Related Vulnerabilities