HIGH 8.6

CVE-2026-47139: vm2 Sandbox Network Bypass via Internal HTTP Modules

vm2 is a popular Node.js sandbox designed to safely execute untrusted code in an isolated environment. A flaw in versions before 3.11.4 allows bypassing network restrictions by exploiting Node.js internal HTTP modules that the sandbox wasn't designed to block. Even when administrators explicitly deny access to standard network libraries like http and https, attackers can abuse hidden internal modules (_http_client and _http_server) to make outbound requests or create listening sockets, defeating the sandbox's security controls.

Source data · NVD / CISA · public domain

CVSS
3.1 · 8.6 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Weaknesses (CWE)
CWE-693
Affected products
0 configuration(s)
Published / Modified
2026-06-12 / 2026-06-17

NVD description (verbatim)

vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, NodeVM supports excluding public network builtins from the wildcard builtin option. With this configuration direct access to http, https, http2, net, dgram, tls, dns, and dns/promises is blocked. However, Node.js also exposes underscored internal HTTP builtins such as _http_client and _http_server. These are not blocked when the public modules are excluded. Sandboxed code can use these internal builtins to make outbound HTTP requests and open listening HTTP sockets even though the public network modules are denied. This issue has been patched in version 3.11.4.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

NodeVM in vm2 allows administrators to restrict access to public network builtins via a wildcard exclusion mechanism. However, the implementation failed to account for Node.js internal modules prefixed with underscores—specifically _http_client, _http_server, and related DNS internals. These undocumented interfaces expose the same network capabilities as their public counterparts. A sandbox escape is possible because sandboxed code can require() these internal modules directly, circumventing the intended access control model. The vulnerability stems from an incomplete blocklist in CWE-693 (Protection Mechanism Failure), where the sandbox assumes all network-relevant exports are covered by the public API surface.

Business impact

Organizations using vm2 to execute third-party or user-supplied code in a trusted-network-only context are at risk. Attackers within the sandbox can exfiltrate data by making HTTP requests to external systems, establish reverse shells, scan internal networks, or participate in distributed attacks—actions that should have been impossible under the sandbox's network policy. This degrades the integrity of any security model that relies on vm2's isolation promises for threat containment.

Affected systems

vm2 versions before 3.11.4 are affected. The vulnerability only manifests when NodeVM is explicitly configured to block public network modules. Default installations that do not restrict network access are not vulnerable to this specific bypass. Organizations should inventory Node.js applications that use vm2 as a sandboxing layer, particularly in code evaluation, plugin execution, or untrusted script platforms.

Exploitability

Exploitation requires no authentication, network access, or user interaction—only the ability to execute code within a vm2 sandbox that has the vulnerable network policy in place. The attack is straightforward: sandboxed code simply requires an internal module like require('_http_client') and uses it to initiate network operations. The barrier to exploitation is low for any attacker who gains code execution within the sandbox context, making this a high-severity containment failure.

Remediation

Upgrade vm2 to version 3.11.4 or later. The patch blocks access to internal HTTP and DNS modules in the same manner as public equivalents. After patching, validate that your sandbox configuration matches your security intent and conduct regression testing to ensure legitimate sandbox use cases remain functional.

Patch guidance

Upgrade vm2 to version 3.11.4 or later. Verify the upgrade in your package-lock.json or yarn.lock file. No configuration changes are required post-patch; existing network policies will now correctly enforce the intended restrictions. Test any applications that depend on vm2 to confirm expected sandbox behavior is preserved.

Detection guidance

Monitor for unusual require() calls within sandboxed environments, particularly for modules starting with underscores (_http_client, _http_server, _http_common, dns/promises internals). Log all network outbound connections initiated from processes running vm2 sandboxes and correlate them with the sandbox's stated network policy. In Node.js debug logs, look for requires of internal modules that should have been blocked. Review vm2 security policy configurations to ensure network restrictions are intentional and documented.

Why prioritize this

This is a HIGH-severity sandbox escape that defeats explicit security controls. Organizations relying on vm2's network isolation guarantees should patch immediately. The vulnerability is trivial to exploit and has no known active exploitation in the wild yet, but the risk window is narrow given the straightforward nature of the bypass and potential for supply-chain attack scenarios where vm2 acts as a trust boundary for plugin or worker execution.

Risk score, explained

CVSS 3.1 score of 8.6 (HIGH) reflects network-adjacent attackability (AV:N), low complexity (AC:L), no privilege or user interaction (PR:N, UI:N), and changed scope (S:C). The impact is confidentiality (C:H) due to data exfiltration risk, with no direct availability impact. The score accurately captures the severity of a sandbox containment failure that undermines the trust model of applications built on vm2.

Frequently asked questions

Does this affect vm2 if I'm not explicitly blocking network modules?

No. This vulnerability only applies if your NodeVM configuration explicitly denies access to public network builtins (http, https, etc.). If you allow network access or do not use vm2 at all, you are not vulnerable to this specific bypass. However, you should still upgrade for defense-in-depth.

Can the patch be applied to version 3.11.3 without upgrading?

No. The fix is integral to version 3.11.4. Backports to earlier 3.x versions have not been released. Upgrade to 3.11.4 or later.

What happens if sandboxed code tries to require _http_client after patching?

After the patch, the require will fail or be blocked by the same mechanism that blocks the public http module. The sandbox will enforce its stated network policy consistently.

Is there a way to detect if this vulnerability was exploited in my environment before patching?

Check application logs and network telemetry for unexpected outbound HTTP connections from your vm2-using processes. Review audit logs if you monitor require() calls. However, absence of evidence is not certainty; a sophisticated attacker may have been careful to avoid logging. Patching and monitoring going forward is your best recourse.

This analysis is based on the official CVE-2026-47139 disclosure and vendor advisory. No active exploit code or proof-of-concept is referenced. Organizations should verify patch availability and compatibility with their specific vm2 deployment before applying updates. This write-up is for informational purposes and does not constitute professional security or legal advice. Consult your security team and vendor documentation for deployment-specific guidance. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).