CVE-2026-47139: Vm2 NodeVM Network Builtin Exclusions Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-r9pm-gxmw-wv6p
CVSS 8.6
CWE-693
Published
Advisory Summary

CVE-2026-47139 is a HIGH (CVSS 8.6) nodevm network builtin exclusions bypass vulnerability (CWE-693: Protection Mechanism Failure) affecting Vm2 libraries in the npm ecosystem. The issue involves nodevm network builtin exclusions bypass via internal _http_client and _http_server. Remediation is available by upgrading affected packages to version 3.11.4.

CVE-2026-47139 at a Glance

CVE Identifier CVE-2026-47139
GHSA Identifier GHSA-r9pm-gxmw-wv6p
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product Vm2
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-47139

To remediate this vulnerability, upgrade all affected Vm2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

vm2 fixed: 3.11.4
npm install vm2@3.11.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls vm2

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-47139, inspect your project dependencies using npm:

npm ls vm2

Analyze the terminal output to locate any version of Vm2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.4), your application is affected.

Note: The npm ls vm2 command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Vm2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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.

CVE-2026-47139 Affected Vm2 Versions

1 component(s)
Fixed Versions:
3.11.4
Product / Package Ecosystem Affected Versions Fixed Version
vm2
npm
< 3.11.4
3.11.4

References

Frequently Asked Questions

What is CVE-2026-47139?
CVE-2026-47139 is a security vulnerability in Vm2 involving NodeVM network builtin exclusions bypass via internal _http_client and _http_server under CWE-693: Protection Mechanism Failure.
Which Vm2 versions are affected?
Affected versions include releases prior to 3.11.4 across affected packages: vm2.
What version fixes CVE-2026-47139?
Upgrading to 3.11.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vm2 affected?
Yes, vm2 is affected in releases prior to 3.11.4. Upgrade your dependency to 3.11.4 or later.
What is the CVSS score of CVE-2026-47139?
CVE-2026-47139 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-47139?
CVE-2026-47139 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check npm dependencies for CVE-2026-47139?
Run the dependency tree command: 'npm ls vm2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-r9pm-gxmw-wv6p",
  "modified" : "2026-06-12T19:30:09Z",
  "published" : "2026-05-29T18:08:06Z",
  "aliases" : [ "CVE-2026-47139" ],
  "summary" : "NodeVM network builtin exclusions bypass via internal _http_client and _http_server",
  "details" : "## Summary\n\n`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.\n\nHowever, 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.\n\nSandboxed code can use these internal builtins to make outbound HTTP requests and open listening HTTP sockets even though the public network modules are denied.\n\n**Note**: This is not host RCE. It is a network capability bypass that can lead to SSRF-style access to internal services.\n\n## Details\n\nThe wildcard builtin expansion is based on Node.js builtin module names:\n\n```js\nconst BUILTIN_MODULES = (nmod.builtinModules || Object.getOwnPropertyNames(process.binding('natives')))\n  .filter(s=>!s.startsWith('internal/') && !DANGEROUS_BUILTINS.has(s));\n```\n\nPublic modules can be excluded with `-name`:\n\n```js\nif (builtins.indexOf(`-${name}`) === -1) {\n  addDefaultBuiltin(res, name, hostRequire);\n}\n```\n\nBut excluding `http` and `net` does not exclude internal siblings such as:\n\n```text\n_http_client\n_http_server\n_tls_wrap\n```\n\nThese internal modules expose network primitives.\n\nConfirmed examples:\n\n1. `require('_http_client').ClientRequest(...)` performs an outbound HTTP request to a host-local service while `http` and `net` are blocked.\n2. `require('_http_server').Server(...).listen(...)` opens a listening HTTP socket while `http` and `net` are blocked.\n\n## PoC\n\nTested on:\n\n```text\nvm2: 3.11.2\nNode.js: v25.9.0\n```\n\nRun from the vm2 repository root:\n\n```bash\nnode poc/internal-http-builtin-network-bypass.js\n```\n[internal-http-builtin-network-bypass.js](https://github.com/user-attachments/files/27571182/internal-http-builtin-network-bypass.js)\n\n\nThe PoC first confirms the intended restrictions work then bypasses them:\n\n```text\nrequire(\"_http_client\").ClientRequest(...)\n```\n\nThis performs an HTTP request to a host-local service and reads the response.\n\nIt also confirms:\n\n```text\nrequire(\"_http_server\").Server(...).listen(0)\n```\n\nThis opens a listening HTTP socket from inside the sandbox.\n\n<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\" />\n\n## Impact\n\nAn 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.\n\nThis can allow SSRF-style access to localhost services, metadata endpoints, internal admin panels, or other network resources reachable from the host process.\n\n## Suggested fix\n\nTreat underscored internal network modules as dangerous or link their availability to the public module they wrap.\n\nAt minimum, exclude related internal modules such as:\n\n```text\n_http_agent\n_http_client\n_http_common\n_http_incoming\n_http_outgoing\n_http_server\n_tls_common\n_tls_wrap\n```\n\nAlternatively, deny underscored Node.js internals from wildcard builtin expansion by default.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "vm2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.11.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.11.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/patriksimek/vm2/security/advisories/GHSA-r9pm-gxmw-wv6p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47139"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/patriksimek/vm2/commit/436053e30eecbabd487e2fd2959c137ac34e2bb1"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/patriksimek/vm2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/patriksimek/vm2/releases/tag/v3.11.4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-693" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-29T18:08:06Z",
    "nvd_published_at" : "2026-06-12T15:16:28Z"
  }
}