## 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: ```js 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`: ```js if (builtins.indexOf(`-${name}`) === -1) { addDefaultBuiltin(res, name, hostRequire); } ``` But excluding `http` and `net` does not exclude internal siblings such as: ```text _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: ```text vm2: 3.11.2 Node.js: v25.9.0 ``` Run from the vm2 repository root: ```bash node poc/internal-http-builtin-network-bypass.js ``` [internal-http-builtin-network-bypass.js](https://github.com/user-attachments/files/27571182/internal-http-builtin-network-bypass.js) The PoC first confirms the intended restrictions work then bypasses them: ```text require("_http_client").ClientRequest(...) ``` This performs an HTTP request to a host-local service and reads the response. It also confirms: ```text require("_http_server").Server(...).listen(0) ``` This opens a listening HTTP socket from inside the sandbox. <img width="951" height="623" alt="Screenshot 2026-05-10 at 1 07 39 PM" src="https://github.com/user-attachments/assets/21bfb1ff-dd15-423a-92c4-0337cd07816c" /> ## 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: ```text _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.
## 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: ```js 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`: ```js if (builtins.indexOf(`-${name}`) === -1) { addDefaultBuiltin(res, name, hostRequire); } ``` But excluding `http` and `net` does not exclude internal siblings such as: ```text _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: ```text vm2: 3.11.2 Node.js: v25.9.0 ``` Run from the vm2 repository root: ```bash node poc/internal-http-builtin-network-bypass.js ``` [internal-http-builtin-network-bypass.js](https://github.com/user-attachments/files/27571182/internal-http-builtin-network-bypass.js) The PoC first confirms the intended restrictions work then bypasses them: ```text require("_http_client").ClientRequest(...) ``` This performs an HTTP request to a host-local service and reads the response. It also confirms: ```text require("_http_server").Server(...).listen(0) ``` This opens a listening HTTP socket from inside the sandbox. <img width="951" height="623" alt="Screenshot 2026-05-10 at 1 07 39 PM" src="https://github.com/user-attachments/assets/21bfb1ff-dd15-423a-92c4-0337cd07816c" /> ## 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: ```text _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.
Update vm2 to 3.11.4 if you use the affected versions. Test the change in a non-production environment first.
Local check
hol-guard supply-chain scanNodeVM network builtin exclusions bypass via internal _http_client and _http_server affects vm2 (npm). Severity is high. ## 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: ```js 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`: ```js if (builtins.indexOf(`-${name}`) === -1) { addDefaultBuiltin(res, name, hostRequire); } ``` But excluding `http` and `net` does not exclude internal siblings such as: ```text _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: ```text vm2: 3.11.2 Node.js: v25.9.0 ``` Run from the vm2 repository root: ```bash node poc/internal-http-builtin-network-bypass.js ``` [internal-http-builtin-network-bypass.js](https://github.com/user-attachments/files/27571182/internal-http-builtin-network-bypass.js) The PoC first confirms the intended restrictions work then bypasses them: ```text require("_http_client").ClientRequest(...) ``` This performs an HTTP request to a host-local service and reads the response. It also confirms: ```text require("_http_server").Server(...).listen(0) ``` This opens a listening HTTP socket from inside the sandbox. <img width="951" height="623" alt="Screenshot 2026-05-10 at 1 07 39 PM" src="https://github.com/user-attachments/assets/21bfb1ff-dd15-423a-92c4-0337cd07816c" /> ## 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: ```text _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.
AI coding agents often install or upgrade packages automatically in npm. A high vulnerability in a dependency can be pulled into a project through a normal install or update without a human reviewing the change, expanding the blast radius from a single package to every agent workspace that depends on it.
| Package | Affected range | Fixed version |
|---|---|---|
| vm2npm | <=3.11.3 | 3.11.4 |
Fixed versions are reported by the source feed; confirm compatibility before updating.
Reported by GitHub Security Advisories (ghsa).
HOL Guard can help your team review package activity against supported protection paths.
Explore HOL GuardUpdate vm2 to 3.11.4 if you use the affected versions. Test the change in a non-production environment first.
Local check
hol-guard supply-chain scanNodeVM network builtin exclusions bypass via internal _http_client and _http_server affects vm2 (npm). Severity is high. ## 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: ```js 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`: ```js if (builtins.indexOf(`-${name}`) === -1) { addDefaultBuiltin(res, name, hostRequire); } ``` But excluding `http` and `net` does not exclude internal siblings such as: ```text _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: ```text vm2: 3.11.2 Node.js: v25.9.0 ``` Run from the vm2 repository root: ```bash node poc/internal-http-builtin-network-bypass.js ``` [internal-http-builtin-network-bypass.js](https://github.com/user-attachments/files/27571182/internal-http-builtin-network-bypass.js) The PoC first confirms the intended restrictions work then bypasses them: ```text require("_http_client").ClientRequest(...) ``` This performs an HTTP request to a host-local service and reads the response. It also confirms: ```text require("_http_server").Server(...).listen(0) ``` This opens a listening HTTP socket from inside the sandbox. <img width="951" height="623" alt="Screenshot 2026-05-10 at 1 07 39 PM" src="https://github.com/user-attachments/assets/21bfb1ff-dd15-423a-92c4-0337cd07816c" /> ## 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: ```text _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.
AI coding agents often install or upgrade packages automatically in npm. A high vulnerability in a dependency can be pulled into a project through a normal install or update without a human reviewing the change, expanding the blast radius from a single package to every agent workspace that depends on it.
| Package | Affected range | Fixed version |
|---|---|---|
| vm2npm | <=3.11.3 | 3.11.4 |
Fixed versions are reported by the source feed; confirm compatibility before updating.
Reported by GitHub Security Advisories (ghsa).
HOL Guard can help your team review package activity against supported protection paths.
Explore HOL Guard