Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit untrusted JS to vm2 NodeVM
-
DeliveryObtain proxied host https.globalAgent
-
ExploitRegister agent 'free' event listener
-
ExecutionCapture live TLSSocket and request options on connection release
-
PersistRead Authorization header and response plaintext
-
ImpactReplay authenticated requests with stolen credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Resource sphere isolation
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the host application to (1) execute untrusted JavaScript inside a vm2 NodeVM and (2) have the NodeVM explicitly configured to permit require('https') - this is not vm2's default. Exploitation is further limited by an opportunistic timing dependency: the sandbox can only harvest credentials and response bodies when the host process independently issues outbound HTTPS requests whose pooled connections are released ('free' event) while the sandbox listener is registered. Affected versions are strictly vm2 3.11.3 through 3.11.6; 3.11.7 fixes it. There is no user interaction requirement, but the config gate and the need for concurrent host HTTPS traffic materially constrain realistic exploitation. |
| Impact | The vendor rates this CVSS 4.0 10.0, but real-world priority is materially lower once gating conditions are considered. Two prerequisites must both hold: (1) the application must run untrusted JavaScript inside vm2's NodeVM (the intrinsic vm2 threat model), and (2) the NodeVM must be explicitly, non-defaultly configured to allow require('https'). Beyond configuration, successful exploitation depends on the host process concurrently making its own outbound HTTPS requests whose pooled connections get released while sandbox code is listening - a timing/opportunity dependency the CVSS 4.0 AC:L/AT:N vector does not capture; I assess AC:H. The impact, however, is genuine and serious where conditions align: theft of the host's Authorization headers and TLS response plaintext, plus replay of authenticated requests with stolen credentials (confidentiality-dominant with limited integrity via credential replay against external systems). No EPSS score, no CISA KEV listing, and no public exploit code are present in the provided data, so exploitation status is: no public exploit identified at time of analysis. This is a legitimate high-impact sandbox-boundary flaw for the specific vm2 deployment class, not a broadly wormable internet-facing 10.0; treat as high priority only for applications actually executing untrusted code in vm2 with https exposed. |
| Exploit ScenarioDerived | An application uses vm2 NodeVM to run untrusted user-supplied JavaScript and has explicitly allowed require('https'). The sandboxed code obtains the read-only proxy of the host https.globalAgent and registers an 'on("free")' listener; when the host process later releases a pooled HTTPS connection from an unrelated outbound request, the listener receives live request options and the host TLSSocket, letting the attacker read the host's Authorization header, capture response bodies in plaintext, and replay authenticated requests with the stolen credentials. No public proof-of-concept is referenced in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
Credential disclosure and HTTPS session hijacking in vm2 3.11.3 through 3.11.6 allow sandboxed JavaScript to read host Authorization headers, private destination host/port information, and subsequent plaintext response bodies when a NodeVM is explicitly configured to allow require('https') and the host process concurrently issues outbound HTTPS requests. The vendor rates this CVSS 4.0 10.0, but our independent assessment scores it CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N; exploitation requires the non-default require('https') configuration plus opportunistic timing when pooled host connections emit the 'free' event. There is no public exploit identified at time of analysis, and no CISA KEV confirmation was provided in the intelligence.
RemediationAI
Upgrade vm2 to 3.11.7, which is the vendor-released patch for this issue. For any deployment that cannot immediately upgrade, disable NodeVM permission for require('https') or remove builtin access to https for untrusted code, recognizing that this may break sandbox functionality that legitimately relies on HTTPS; additionally, run untrusted JavaScript in a separate process or container with no inherited host credentials and restricted outbound network access, and rotate any credentials that may have been exposed through host Authorization headers. See the vendor advisory GHSA-h85j-hv3c-qfgq at https://github.com/patriksimek/vm2/security/advisories/GHSA-h85j-hv3c-qfgq and the VulnCheck advisory at https://www.vulncheck.com/advisories/vm2-3.11.3-through-3.11.6-https-credential-exposure-via-globalagent for additional details.
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
CWE-668, Exposure of Resource to Wrong Sphere, is the root cause class: vm2's NodeVM builtin loader wraps host modules in a read-only proxy, but method calls such as Agent.prototype.on() are forwarded to the underlying host object, including the real https.globalAgent. When sandboxed code registers a listener for the agent's 'free' event, it receives live host request options and the host TLSSocket when an unrelated host HTTPS request releases a pooled connection. This lets sandbox code read the host's Authorization header and private destination host/port, attach a data listener to the released socket to read subsequent host response bodies in plaintext, and issue attacker-chosen authenticated requests using stolen credentials. The supplied CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:* represents the affected product line, with affected versions strictly 3.11.3 through 3.11.6 and the fix in 3.11.7.
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
Sandbox-to-host boundary crossing gives S:C; AC:H for the required concurrent host HTTPS request/connection-release timing; PR:N within vm2's untrusted-code model; C:H (credential/response theft), I:L (authenticated request replay), A:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
vm2 versions 3.11.3 through 3.11.6 expose the host process's real https.globalAgent to sandboxed code when a NodeVM is explicitly configured to allow require('https'). The builtin loader wraps host modules in a read-only proxy, but method calls such as Agent.prototype.on() are forwarded to the underlying host object, so sandbox code can register a listener for the agent's 'free' event. When an unrelated host HTTPS request releases a pooled connection, the listener receives the live host request options and the host TLSSocket, allowing sandboxed code to read the host's Authorization header and private destination host/port, attach a data listener to the released socket and read subsequent host response bodies in plaintext, and issue attacker-chosen authenticated requests using the stolen credentials. The issue is 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-668, Exposure of Resource to Wrong Sphere.
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 vulnerability in the vm2 JavaScript sandbox library (versions 3.11.3 through 3.11.6) can leak host process credentials - including HTTPS Authorization headers and private destination host/port details - into code running inside the sandbox, potentially enabling session hijacking of outbound HTTPS traffic. Any team running vm2 to execute untrusted or third-party JavaScript, particularly in plugin, workflow, or customer-supplied-code platforms with require('https') enabled, is exposed; leadership should treat this as a credential-compromise risk to production systems and third-party APIs, not merely a library defect. No vendor patch is currently available, so exposure must be contained through configuration and architectural controls.
No vendor-released patch identified at time of analysis. Interim mitigations: disable require('https') in NodeVM configurations (removes the precondition for exploitation), block or allowlist outbound HTTPS egress from sandboxed processes, rotate and shorten the lifetime of credentials carried on outbound HTTPS requests, isolate sandbox workloads in separate network namespaces or containers, and enable egress logging and alerting for unexpected destination hosts or ports.
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-81590
GHSA-5843-9mh5-hhgw
NVD
CVE.org
EPSS
Exploit-DB