CVE-2026-47140: Vm2 NodeVM Builtin Denylist Bypass Vulnerability
CRITICALCVE-2026-47140 is a CRITICAL (CVSS 10.0) nodevm builtin denylist bypass vulnerability (CWE-693: Protection Mechanism Failure) affecting Vm2 libraries in the npm ecosystem. The issue involves nodevm builtin denylist bypass via process and inspector/promises allows host code execution. Remediation is available by upgrading affected packages to version 3.11.4.
CVE-2026-47140 at a Glance
Security Impact
CVSS: 10.0
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:H/A:H).
How to Fix CVE-2026-47140
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.
npm install vm2@3.11.4
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-47140, 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
CVE-2026-47140 Affected Vm2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vm2
|
npm |
< 3.11.4
|
3.11.4
|
References
Frequently Asked Questions
What is CVE-2026-47140?
Which Vm2 versions are affected?
What version fixes CVE-2026-47140?
Is vm2 affected?
What is the CVSS score of CVE-2026-47140?
What CWE is associated with CVE-2026-47140?
How can I check npm dependencies for CVE-2026-47140?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rp36-8xq3-r6c4",
"modified" : "2026-06-12T20:56:50Z",
"published" : "2026-05-29T17:59:23Z",
"aliases" : [ "CVE-2026-47140" ],
"summary" : "NodeVM builtin denylist bypass via process and inspector/promises allows host code execution",
"details" : "## Summary\n\n`NodeVM` blocks several dangerous Node.js builtins such as `module`, `worker_threads`, `cluster`, `vm`, `repl`, and `inspector`.\n\nHowever, the denylist misses `process` and `inspector/promises`. Both can be used from sandboxed code to reach host-side execution primitives.\n\nThis allows sandboxed code to bypass the intended builtin restrictions and execute code in the host process.\n\n## Details\n\nThe dangerous builtin denylist is defined in `lib/builtin.js`. This list does not include:\n\n```text\nprocess\ninspector/promises\n```\n\nNon-denied builtins are exposed to the sandbox through:\n\n```js\nbuiltins.set(key, special ? special : vm => vm.readonly(hostRequire(key)));\n```\n\nBecause of this, sandboxed code can bypass the expected restrictions in two ways:\n\n1. `require('process').getBuiltinModule('child_process')` reloads `child_process`, even when `child_process` is excluded.\n2. `require('inspector/promises')` exposes the Inspector protocol and can call `Runtime.evaluate` in the host process.\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/dangerous-builtin-denylist-rce.js\n```\n[dangerous-builtin-denylist-rce.js](https://github.com/user-attachments/files/27570113/dangerous-builtin-denylist-rce.js)\n\n\nThe PoC first confirms the intended restrictions work:\n\n```text\nrequire(\"inspector\"): BLOCKED\nrequire(\"child_process\"): BLOCKED\n```\n\nThen it bypasses them:\n\n```text\nrequire(\"process\").getBuiltinModule(\"child_process\").execFileSync(...)\n```\n\nThis spawns a host child process. It also confirms:\n\n```text\nrequire(\"inspector/promises\").Session().post(\"Runtime.evaluate\", ...)\n```\n\nThis evaluates JavaScript in the host process.\n\n<img width=\"858\" height=\"766\" alt=\"Screenshot 2026-05-10 at 11 53 33 AM\" src=\"https://github.com/user-attachments/assets/7614aecb-5ffd-4c41-bfe8-e1fcb3b1bb59\" />\n\n## Impact\n\nAn attacker who can run untrusted JavaScript inside `NodeVM` with affected builtin settings can escape the sandbox and execute arbitrary code in the host process.\n\nThis can lead to full compromise of the application process, including reading files, writing files, spawning processes, and accessing host environment secrets.\n\n(This is not reachable with the default NodeVM configuration where require is disabled or no affected builtins are allowed. It affects applications that allow process, inspector/promises, or the wildcard \"*\" in require.builtin.)\n\n## Suggested fix\n\nAdd `process` and `inspector/promises` to the dangerous builtin blocklist.\n\nAlso consider blocking dangerous builtin families by prefix, for example blocking both:\n\n```text\ninspector\ninspector/*\n```\n\ninstead of only exact module names.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"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-rp36-8xq3-r6c4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47140"
}, {
"type" : "WEB",
"url" : "https://github.com/patriksimek/vm2/commit/a1ed47a98d1cc36cb48c0d566d55889688e0b59b"
}, {
"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" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-29T17:59:23Z",
"nvd_published_at" : "2026-06-12T15:16:28Z"
}
}