CVE-2026-92941 — Vulnerability in vm2 — CVE Details
vm2 NodeVM can replace the host process TLS trust store
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.29%). 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-92941 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 tls module to a NodeVM when that builtin is explicitly allowed. Although the module object is wrapped as read-only, its functions still execute against process-wide host state. On Node.js versions that provide tls.setDefaultCACertificates(), sandbox code can replace the certificate authorities trusted by subsequent host-realm TLS clients.
The exploit needs only the narrowly allowed tls and url builtins. It does not require fs, process, module, child_process, an external package, or a general '*' builtin grant. A host HTTPS request rejected an attacker certificate before sandbox execution, then accepted the same certificate and returned an application marker after the sandbox replaced the default CA list.
This crosses the intended sandbox boundary. An attacker can make host HTTPS clients trust an attacker-controlled CA, enabling credential theft and response tampering when the attacker can influence a subsequent destination or network path. Replacing the list also removes the normal trust roots, disrupting unrelated host TLS traffic.
Details
The vulnerable boundary is the default builtin loader in lib/builtin.js. Builtins that are not classified as dangerous are exposed through a recursive read-only bridge:
builtins.set(key, special ? special : vm => vm.readonly(hostRequire(key)));
The read-only wrapper prevents ordinary property assignment through the sandbox proxy. It does not make calls such as tls.setDefaultCACertificates() sandbox-local. That function changes the default CA list for the current Node.js thread and affects subsequent TLS connections that do not provide their own ca option.
The dangerous-builtin list now rejects dns because dns.setServers() mutates process-wide host networking state. It does not reject tls, even though current Node.js exposes an equivalent process-wide trust mutation through it.
A direct call with a normal sandbox array is not necessary. The native TLS function requires an actual host-realm array. The allowed host url module provides one:
const tls = require('tls');
const {URLSearchParams} = require('url');
const hostArray = new URLSearchParams(
'ca=' + encodeURIComponent(attackerCaPem)
).getAll('ca');
tls.setDefaultCACertificates(hostArray);
URLSearchParams.getAll() executes in the host realm and returns a host array containing the attacker-controlled PEM string. vm2 maps that array into the sandbox. When the mapped value is passed back to the TLS function, the bridge unwraps it to the original host array, satisfying the native type check. The TLS function then replaces the host thread's default CA set.
The complete exploit flow is:
attacker-controlled NodeVM program
-> require only the allowed tls and url builtins
-> URLSearchParams.getAll() creates a host array containing attacker CA PEM
-> bridge unwraps the mapped array when passed back to tls
-> tls.setDefaultCACertificates() replaces host default trust roots
-> subsequent host-realm HTTPS client accepts attacker-signed certificates
-> attacker can observe or modify application TLS traffic
The API is present in Node.js 22.19.0 and later in the 22.x line, and Node.js 24.5.0 and later in the 24.x line.
PoC
The attached PoC is fully local. It creates a temporary CA and a loopback HTTPS server signed by that CA, then performs two requests from the host realm.
-
Install Node.js 22.19.0 or later in the 22.x line, or Node.js 24.5.0 or later in the 24.x line. OpenSSL must also be available.
-
In the attached
pocdirectory, run:npm install --ignore-scripts node poc.js -
A vulnerable result has all of these properties:
- the first host request fails with a certificate verification error;
- the sandbox reports that it supplied one host-realm CA entry;
- the second host request succeeds with HTTP 200;
- the second response body is
VM2_POC_HOST_TLS_RESPONSE_3e71c8.
The server listens only on loopback and the PoC makes no external request.
Impact
This is an improper sandbox authorization boundary around a process-wide TLS security setting.
An attacker who can submit code to a NodeVM configured with the tls and url builtins can:
- replace the CAs used by subsequent host-side HTTPS and TLS clients;
- make the host authenticate services presenting certificates signed by the attacker;
- intercept host credentials, API tokens, session data, request bodies, and responses when the attacker can influence DNS, routing, a proxy, or a later request destination;
- modify trusted responses, including configuration, webhook, update, identity, and package-retrieval traffic;
- remove the normal trusted roots and cause unrelated host TLS connections to fail.
The attacker does not obtain a direct file or command-execution primitive from this PoC. The critical impact is control of the host process's authentication trust decision, outside the sandbox's authority. Connections that explicitly provide their own CA list are not affected, and already cached TLS sessions may remain unchanged.
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-732Incorrect Permission AssignmentMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L
References
- https://github.com/patriksimek/vm2/security/advisories/GHSA-98xx-8mx4-x7cmWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-92941ADVISORY
- 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-before-3.11.7-tls-trust-store-manipulationWEB
Frequently Asked Questions
- What is CVE-2026-92941?
- vm2 NodeVM can replace the host process TLS trust store. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by CVE-2026-92941?
- CVE-2026-92941 affects vm2. It has a 0.3% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-92941 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 14.1% 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-92955CRITICAL
vm2: Sandbox Escape (NodeVM)
- 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-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