CVE-2026-22709
Unknown Unknown - Not Provided
Promise Callback Sanitization Bypass in vm2 Enables Sandbox Escape

Publication date: 2026-01-26

Last updated on: 2026-02-17

Assigner: GitHub, Inc.

Description
vm2 is an open source vm/sandbox for Node.js. In vm2 prior to version 3.10.2, `Promise.prototype.then` `Promise.prototype.catch` callback sanitization can be bypassed. This allows attackers to escape the sandbox and run arbitrary code. In lib/setup-sandbox.js, the callback function of `localPromise.prototype.then` is sanitized, but `globalPromise.prototype.then` is not sanitized. The return value of async functions is `globalPromise` object. Version 3.10.2 fixes the issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-01-26
Last Modified
2026-02-17
Generated
2026-05-07
AI Q&A
2026-01-27
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
vm2_project vm2 to 3.10.2 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-913 The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CWE-693 The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability in vm2 prior to version 3.10.2 involves a bypass of the sanitization of Promise callback functions. Specifically, while the callback function of localPromise.prototype.then is sanitized, the globalPromise.prototype.then is not. Since async functions return a globalPromise object, attackers can exploit this to escape the sandbox and execute arbitrary code.


How can this vulnerability impact me? :

An attacker exploiting this vulnerability can escape the vm2 sandbox and run arbitrary code on the host system. This can lead to full compromise of the environment where vm2 is used, potentially allowing unauthorized access, data manipulation, or disruption of services.


What immediate steps should I take to mitigate this vulnerability?

Upgrade vm2 to version 3.10.2 or later, as this version fixes the Promise callback sanitization bypass issue that allows sandbox escape and arbitrary code execution.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart