PT-2026-45022 · Npm · Vm2

Published

2026-05-29

·

Updated

2026-05-29

·

CVE-2026-47139

CVSS v3.1

8.6

High

VectorAV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

Summary

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.
Note: This is not host RCE. It is a network capability bypass that can lead to SSRF-style access to internal services.

Details

The wildcard builtin expansion is based on Node.js builtin module names:
const BUILTIN MODULES = (nmod.builtinModules || Object.getOwnPropertyNames(process.binding('natives')))
 .filter(s=>!s.startsWith('internal/') && !DANGEROUS BUILTINS.has(s));
Public modules can be excluded with -name:
if (builtins.indexOf(`-${name}`) === -1) {
 addDefaultBuiltin(res, name, hostRequire);
}
But excluding http and net does not exclude internal siblings such as:
 http client
 http server
 tls wrap
These internal modules expose network primitives.
Confirmed examples:
  1. require(' http client').ClientRequest(...) performs an outbound HTTP request to a host-local service while http and net are blocked.
  2. require(' http server').Server(...).listen(...) opens a listening HTTP socket while http and net are blocked.

PoC

Tested on:
vm2: 3.11.2
Node.js: v25.9.0
Run from the vm2 repository root:
node poc/internal-http-builtin-network-bypass.js
The PoC first confirms the intended restrictions work then bypasses them:
require(" http client").ClientRequest(...)
This performs an HTTP request to a host-local service and reads the response.
It also confirms:
require(" http server").Server(...).listen(0)
This opens a listening HTTP socket from inside the sandbox.
Screenshot 2026-05-10 at 1 07 39 PM

Impact

An attacker who can run untrusted JavaScript inside NodeVM with this affected builtin configuration can regain network access even when the application attempted to block network modules.
This can allow SSRF-style access to localhost services, metadata endpoints, internal admin panels, or other network resources reachable from the host process.

Suggested fix

Treat underscored internal network modules as dangerous or link their availability to the public module they wrap.
At minimum, exclude related internal modules such as:
 http agent
 http client
 http common
 http incoming
 http outgoing
 http server
 tls common
 tls wrap
Alternatively, deny underscored Node.js internals from wildcard builtin expansion by default.

Fix

Protection Mechanism Failure

Weakness Enumeration

Related Identifiers

CVE-2026-47139
GHSA-R9PM-GXMW-WV6P

Affected Products

Vm2