Horizon Alert
Summary of the vulnerability and why it matters
This advisory details a critical vulnerability in the vm2 JavaScript sandbox library that could expose sensitive host information, such as authentication credentials and request details, to sandboxed code under specific configurations. While the library is designed to isolate untrusted code, an improper handling of the `https.globalAgent` could allow malicious or compromised code within the sandbox to intercept and misuse network traffic and credentials from the host environment. The main concern is confirming relevance and exposure due to the specific configuration required for this vulnerability to be exploitable.
- Sensitive host data exposed to sandbox.
- Impacts applications using this sandbox library.
- Confirm relevance and assess exposure.
Attack Path
How an attacker could exploit the issue
An attacker can reach this vulnerability by exploiting a misconfiguration in the `vm2` sandbox library, specifically when it's set up to allow access to the `https` module. This exposure allows sandboxed code to intercept sensitive information from legitimate host HTTPS requests. The compromised data can then be used to issue authenticated requests on behalf of the host, potentially leading to unauthorized actions and data breaches.
- Entry Condition: Sandbox configured to allow `https` module access.
- Trigger Point: Host initiates an HTTPS request, releasing a pooled connection.
- Resulting Risk: Sensitive host credentials and data exposure.
Live Threat
Current exploitation, exposure, and threat context
When Node.js applications use specific configurations within the vm2 library to allow sandboxed code to access network-related host modules, sensitive information from outgoing HTTPS requests could be exposed. This includes potentially reading request headers, destination details, and even response bodies.
- Host HTTPS request details could be read.
- Sandbox code may listen to agent events.
- Sensitive headers and response data may leak.
Operational Fix
Recommended remediation, mitigation, and detection steps
The vm2 library's vulnerability requires explicit configuration to expose sensitive host information, suggesting that development or platform teams managing Node.js environments are most likely to be impacted. The immediate first step is to identify all instances of the affected library, determine their reachability and criticality within the business context, and assign ownership for remediation planning.
- Ownership: Development or Platform Teams.
- Verify first: Identify and audit vm2 usage.
- Action: Plan and execute upgrades.