Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain code execution in vm2 sandbox with tls+url builtins
-
DeliveryForge host-realm array via URLSearchParams
-
ExploitCall tls.setDefaultCACertificates() to poison CA store
-
ExecutionHost HTTPS clients trust attacker CA
-
ImpactMITM/inject subsequent TLS traffic
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V13 - Configuration Permission assignment review
|
| Exploitation Conditions | Requires that the host application (a) runs attacker-supplied JavaScript inside a vm2 NodeVM instance, AND (b) has explicitly added both the 'tls' and 'url' modules to the sandbox builtin allowlist - this is not vm2's default builtin set. Given those, the sandbox calls tls.setDefaultCACertificates() to overwrite the process-wide CA store. Realized impact is further LIMITED by the need for the host process to make subsequent outbound HTTPS connections and for the attacker to hold a network man-in-the-middle position to present the now-trusted forged certificate; without that positioning the trust-store change alone yields no data. Affects vm2 3.11.3 up to but not including 3.11.7. |
| Impact | This is a config-gated sandbox-integrity flaw, not a default-configuration remote exploit. The vendor CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L = 10.0) drives the maximum score largely on the scope-change metrics (SC:H/SI:H), reflecting that sandboxed code poisons the host process trust store. However, the score is optimistic on two counts. First, exploitation is gated on a non-default deployment: the operator must have exposed both the 'tls' AND 'url' builtins to NodeVM sandbox code, and must already be running untrusted JavaScript in vm2 (the inherent vm2 threat model). Second, PR:N/AC:L understate reality - the described technique (URLSearchParams host-realm arrays → tls.setDefaultCACertificates) is only the first stage; actual impact requires the host process to subsequently make outbound HTTPS calls AND the attacker to occupy a network man-in-the-middle position to present the now-trusted forged certificate, which is closer to AC:H. No EPSS score, no CISA KEV listing, and no public POC are present in the input, so there is no evidence of active or automated exploitation. Net: high theoretical severity for anyone already exposing tls/url builtins to untrusted sandbox code, but a narrow precondition set makes real-world priority moderate rather than critical. Verify the exact builtin allowlist in your deployment before triaging as urgent. |
| Exploit ScenarioDerived | An application runs untrusted user JavaScript inside a vm2 NodeVM and has allowed the 'tls' and 'url' builtins into the sandbox. The attacker's script calls tls.setDefaultCACertificates() (using URLSearchParams to construct the required host-realm array) to inject an attacker-controlled CA into the process-wide trust store, so any later HTTPS request the host makes will silently trust the attacker's forged certificates, enabling interception and injection of that traffic. No public exploit code is identified at time of analysis, though the vendor advisory (GHSA-98xx-8mx4-x7cm) describes the mechanism. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Sandbox escape in vm2 3.11.3 through 3.11.6 lets JavaScript executing inside a NodeVM instance reach the host tls module and call tls.setDefaultCACertificates(), overwriting the process-wide default certificate authority store so that subsequent host HTTPS clients will accept attacker-supplied certificates. The flaw is config-gated rather than a default-configuration remote exploit: the host application must both run attacker-controlled JavaScript inside vm2 and expli(他)citly add the 'tls' and 'url' modules to the sandbox builtin allowlist, which is not vm2's default builtin set, and meaningful data compromise additionally requires the attacker to hold a network man-in-the-middle position to present the newly trusted forged certificate. Consistent with those prerequisites, our assessment scores this as CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:L (unauthenticated from the network, but high attack complexity and scope-changing sandbox-integrity impact) rather than the unmodified 10.0 of the supplied CVSS 4.0 vector; no public exploit code and no confirmed active exploitation were identified at time of analysis.
RemediationAI
Apply the vendor-released patch: upgrade vm2 to 3.11.7 (the first release outside the affected 3.11.3-before-3.11.7 range), per the advisory at https://github.com/patriksimek/vm2/security/advisories/GHSA-98xx-8mx4-x7cm. If immediate upgrading is not possible, the most direct compensating control is to remove 'tls' and, where feasible, 'url' from the NodeVM builtin allowlist so sandboxed code cannot reach setDefaultCACertificates() or the URLSearchParams realm-confusion primitive; the trade-off is that any sandboxed code legitimately using those modules will break and must be refactored to receive a narrowly scoped, sanitized wrapper instead. Because the realized attack also depends on the attacker's ability to present a forged certificate, host-side mitigation is valuable: pin the expected certificates/CA for critical outbound HTTPS clients or restrict egress to explicitly allowlisted destinations, accepting that pinning complicates normal certificate rotation. Additionally, monitor for unexpected changes to the default CA set, isolate the vm2 host process with minimal network egress and least privilege, and treat any host process that runs untrusted vm2 code as untrusted for TLS trust decisions until 3.11.7 is deployed. No public exploit code or confirmed in-the-wild exploitation was identified at time of analysis, so patching can proceed on the normal timeline rather than under emergency-change conditions - though the ease of the trust-store mutation once preconditions are met argues against deferring the 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 Node.js sandbox library that executes untrusted JavaScript in an isolated VM context; NodeVM instances expose a curated set of host modules through a 'builtins' allowlist, and the library's security model depends on preventing sandbox code from obtaining references to host-realm objects and host functions that cross the trust boundary. In this case the tls module was inadvertently reachable from within the sandbox, and its setDefaultCACertificates() function mutates process-global Node.js TLS state (the default CA bundle used by all subsequently created TLS/HTTPS clients), so the sandbox can silently rewrite the host's trust anchors. The bypass is made practical by a realm-confusion technique: URLSearchParams, exposed via the allowed 'url' builtin, can be used to produce arrays belonging to the host realm, which evades vm2's realm/instanceof checks and allows the sandbox to pass host-realm objects into host APIs. The root cause maps to CWE-732 (Incorrect Permission Assignment for Critical Resource) - the sandbox was granted a capability (mutable, process-wide TLS trust configuration) it should never hold - and the cross-boundary integrity impact is reflected in the scope change (S:C) of the assessed vector. Affected code exists in vm2 3.11.3 up to, but not including, 3.11.7, and the CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:* is version-agnostic and must be constrained by the vendor advisory's stated range.
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:N/UI:N/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L
S:C because sandboxed code alters the host process trust store; AC:H as impact needs later host HTTPS calls plus an attacker MITM position; C:H/I:H from traffic interception/injection, A:L minor.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 versions from 3.11.3 before 3.11.7 expose the host tls module to NodeVM sandbox code, allowing attackers to call tls.setDefaultCACertificates() and replace process-wide certificate authorities. Attackers with access to allowed tls and url builtins can use URLSearchParams to create host-realm arrays and manipulate the TLS trust store, enabling subsequent host HTTPS clients to accept attacker-controlled certificates.
Blast Radius
ecosystem impact- 16 npm packages depend on vm2 (5 direct, 11 indirect)
Ecosystem-wide dependent count for version 3.11.3.
Technical POC Analysis
CWE-732 Incorrect Permission Assignment for Critical Resource.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 public PoC link from github
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A critical sandbox escape in vm2 versions 3.11.3 through 3.11.6 could allow an attacker to overwrite the host's default certificate authority store, potentially enabling man-in-the-middle attacks against outbound HTTPS connections. The flaw is unauthenticated from the network but requires a non-standard configuration that explicitly allows the 'tls' and 'url' modules and a network adversary position; no public exploit has been identified at the time of analysis. Leadership should ensure development teams verify and remediate any such configurations, as a successful attack could compromise the integrity of all host TLS connections.
No vendor-released patch identified at time of analysis. Interim mitigations: remove 'tls' and 'url' from the vm2 sandbox builtin allowlist, avoid executing attacker-controlled JavaScript in vm2, and implement network monitoring for man-in-the-middle attacks.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-81591
GHSA-98xx-8mx4-x7cm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB