CVE-2026-24120: Remote Code Execution via Promise Species Hijacking in vm2 Sandbox
Vulnerability ID: CVE-2026-24120
CVSS Score: 9.8
Published: 2026-05-05
An incomplete mitigation for a previous sandbox escape in the vm2 Node.js module allows attackers to execute arbitrary code on the host system. By manipulating Promise species and intercepting internal method calls via prototype pollution, attackers bypass sandbox protections and gain full host access.
TL;DR
vm2 prior to version 3.10.5 contains a critical sandbox escape (CVSS 9.8). Attackers bypass internal security wrappers by overwriting Function.prototype.call and hijacking Promise creation, achieving unauthenticated remote code execution on the host system.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-94, CWE-693
- Attack Vector: Network
- CVSS Score: 9.8 (Critical)
- EPSS Score: 0.00080 (23.22%)
- Exploit Status: Proof of Concept Available
- KEV Status: Not Listed
Affected Systems
- Node.js applications running vm2 versions < 3.10.5
-
vm2: < 3.10.5 (Fixed in:
3.10.5)
Code Analysis
Commit: 4b009c2
Fix Function.prototype.call interception in Promise wrappers
- return globalPromiseThen.call(this, onFulfilled, onRejected);
+ return apply(globalPromiseThen, this, [onFulfilled, onRejected]);
Exploit Details
- Maintainer Test Suite PoC: Proof of concept verifying interception of internal functions via prototype pollution.
Mitigation Strategies
- Upgrade vm2 to version 3.10.5 immediately
- Migrate to alternative isolation technologies (WebAssembly, Docker, Firecracker)
- Implement strong EDR rules to detect child_process spawning from Node.js
Remediation Steps:
- Identify all projects and transitive dependencies relying on vm2.
- Update package.json and lockfiles to enforce vm2 >= 3.10.5.
- Run unit and integration tests to ensure standard functionality remains unaffected by the update.
- Initiate an architectural review to deprecate usage of V8-based sandboxing for untrusted code execution.
References
- GitHub Release v3.10.5
- GitHub Security Advisory GHSA-qvjj-29qf-hp7p
- Fix Commit 4b009c2d4b1131c01810c1205e641d614c322a29
- Red Hot Cyber - Latest Critical Vulnerabilities Analysis
Read the full report for CVE-2026-24120 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)