Skip to main content

vm2 EUVDEUVD-2026-36446

| CVE-2026-47140 CRITICAL
Protection Mechanism Failure (CWE-693)
2026-05-29 https://github.com/patriksimek/vm2 GHSA-rp36-8xq3-r6c4
Critical
Disputed · 10.0 Vendor: https://github.com/patriksimek/vm2
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint executing user JS in NodeVM
  2. Delivery
    Submit payload calling require('process') or require('inspector/promises')
  3. Exploit
    Invoke getBuiltinModule('child_process') or Session.post('Runtime.evaluate')
  4. Execution
    Escape sandbox into host realm
  5. Persist
    Execute arbitrary commands or read process.env
  6. Impact
    Exfiltrate secrets and pivot

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Protection mechanism completeness
Exploitation Conditions

Exploitation requires (1) the target application uses the NodeVM API of vm2 ≤ 3.11.3 to execute attacker-controlled JavaScript, and (2) the embedder's require.builtin configuration explicitly allows one of process, inspector/promises, or wildcard * - this is a non-default option, as the default NodeVM configuration disables require entirely. No user interaction, authentication, or privilege is required of the attacker beyond the ability to submit JavaScript to the sandbox endpoint. Not exploitable against: default NodeVM configurations, the lower-level VM API (only NodeVM uses require.builtin), or deployments that allowlist only safe builtins like events or buffer. Node.js version 22+ is required for the process.getBuiltinModule vector; the inspector/promises vector works on any Node version that exposes the subpath.

Impact

CVSS 10.0 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) reflects the worst-case scenario where untrusted code reaches a misconfigured NodeVM over a network interface - full host compromise with no auth and changed scope. However, real-world risk is materially lower than the raw score suggests because exploitation requires the embedding application to (a) execute attacker-controlled JavaScript inside NodeVM AND (b) opt into a non-default require.builtin configuration that allows process, inspector/promises, or *. The vendor's own impact statement confirms default NodeVM configurations (require disabled, no affected builtins allowed) are not vulnerable. No KEV listing and no EPSS score were provided, but vm2 is a high-value target - multiple prior sandbox escapes have been weaponized rapidly, and publicly available PoC code lowers the barrier to opportunistic exploitation of vulnerable hosted-eval services. Treat as high priority for any product that exposes vm2 to external input, lower priority for internal-only or default-configured deployments.

Exploit ScenarioDerived

An attacker submits JavaScript to an application that evaluates user code inside vm2's NodeVM (e.g., a hosted code playground, server-side template engine, or low-code automation platform) where the embedder has allowed process or wildcard builtins. The attacker's payload calls require('process').getBuiltinModule('child_process').execFileSync('/bin/sh', ['-c', '...']) - or alternatively require('inspector/promises') and posts Runtime.evaluate - to execute arbitrary commands in the host process, leading to file read/write, secret exfiltration from process.env, and full application compromise. Working PoC code is published in the advisory (poc/dangerous-builtin-denylist-rce.js).

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 29, 2026

Sandbox escape leading to remote code execution in vm2 NodeVM versions 3.11.3 and earlier allows attackers running untrusted JavaScript inside the sandbox to break out via two missing entries in the dangerous-builtin denylist: process (whose getBuiltinModule() reloads any core module, including child_process) and inspector/promises (whose Session().post('Runtime.evaluate', ...) evaluates code in the host realm). The flaw is exploitable only when the embedder allows process, inspector/promises, or wildcard * in require.builtin. Publicly available exploit code exists (PoC published with the advisory), and a patch is available in vm2 3.11.4; no public exploit identified at time of analysis as actively used in the wild.

RemediationAI

Vendor-released patch: vm2 3.11.4 - upgrade immediately via npm install vm2@3.11.4 or update lockfiles accordingly; the fix (commit a1ed47a) is a non-breaking patch release with no API changes for valid configurations. As an interim mitigation if upgrade is blocked, audit every NodeVM instantiation and remove process, inspector/promises, and wildcard * from require.builtin, restricting to an explicit minimal allowlist; this preserves the rest of the sandbox at the cost of losing any legitimate use of process inside guest code. If untrusted code is being run, consider disabling require entirely in the NodeVM options, which the vendor confirms is unaffected. Refer to the GitHub Security Advisory at https://github.com/patriksimek/vm2/security/advisories/GHSA-rp36-8xq3-r6c4 and the patch commit at https://github.com/patriksimek/vm2/commit/a1ed47a98d1cc36cb48c0d566d55889688e0b59b for verification.

Affected VersionsENISA

vm2 < 3.11.4

Affected Packages

npm vm2 fix: 3.11.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

vm2 is a widely used Node.js sandbox library (pkg:npm/vm2) that wraps the native vm module to run untrusted JavaScript with controlled access to Node builtins via an embedder-defined allowlist. The defensive denylist in lib/builtin.js historically used exact-match name comparison and explicitly blocked known-dangerous modules (module, worker_threads, cluster, vm, repl, inspector). The CWE-693 (Protection Mechanism Failure) root cause is two gaps in that denylist: the process module exposes getBuiltinModule(name) (Node 22+), which reloads any core module regardless of allow/deny configuration, and inspector/promises is a subpath sibling of the already-blocked inspector that was missed by the exact-name check. Both reach Node's Inspector and child-process primitives that run in the host realm, bypassing the sandbox boundary. The upstream fix in commit a1ed47a98d1cc36cb48c0d566d55889688e0b59b promotes the check to a family-prefix isDangerousBuiltin(key), strips node: URL spellings, and adds process to the dangerous set, codified as Defense Invariant #13.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
Vendor (https://github.com/patriksimek/vm2) PRIMARY 10.0 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Red Hat 4.1 MEDIUM

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: https://github.com/patriksimek/vm2

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

NodeVM blocks several dangerous Node.js builtins such as module, worker_threads, cluster, vm, repl, and inspector.

However, the denylist misses process and inspector/promises. Both can be used from sandboxed code to reach host-side execution primitives.

This allows sandboxed code to bypass the intended builtin restrictions and execute code in the host process.

Details

The dangerous builtin denylist is defined in lib/builtin.js. This list does not include:

text
process
inspector/promises

Non-denied builtins are exposed to the sandbox through:

js
builtins.set(key, special ? special : vm => vm.readonly(hostRequire(key)));

Because of this, sandboxed code can bypass the expected restrictions in two ways:

  1. require('process').getBuiltinModule('child_process') reloads child_process, even when child_process is excluded.
  2. require('inspector/promises') exposes the Inspector protocol and can call Runtime.evaluate in the host process.

PoC

Tested on:

text
vm2: 3.11.2
Node.js: v25.9.0

Run from the vm2 repository root:

bash
node poc/dangerous-builtin-denylist-rce.js

dangerous-builtin-denylist-rce.js

The PoC first confirms the intended restrictions work:

text
require("inspector"): BLOCKED
require("child_process"): BLOCKED

Then it bypasses them:

text
require("process").getBuiltinModule("child_process").execFileSync(...)

This spawns a host child process. It also confirms:

text
require("inspector/promises").Session().post("Runtime.evaluate", ...)

This evaluates JavaScript in the host process.

<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" />

Impact

An attacker who can run untrusted JavaScript inside NodeVM with affected builtin settings can escape the sandbox and execute arbitrary code in the host process.

This can lead to full compromise of the application process, including reading files, writing files, spawning processes, and accessing host environment secrets.

(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.)

Suggested fix

Add process and inspector/promises to the dangerous builtin blocklist.

Also consider blocking dangerous builtin families by prefix, for example blocking both:

text
inspector
inspector/*

instead of only exact module names.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 5 npm packages depend on vm2 (4 direct, 1 indirect)

Ecosystem-wide dependent count for version 3.11.4.

Executive ViewAI

Why It Matters

vm2 NodeVM (versions 3.11.3 and earlier) contains a critical sandbox escape vulnerability (CVSS 10.0) enabling remote code execution. Publicly available exploit code exists. Organizations using vm2 to run untrusted JavaScript-such as user-submitted scripts or plugin systems-face immediate risk of complete system compromise.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 67% exploitable
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy