CVE-2026-22709CWE-693CWE-913CWE-94

vm2 has a Sandbox Escape

Critical · published January 26, 2026

CVSS v3.1
9.8
EPSS
1%
Percentile
69.6
In the wild
Unconfirmed
What it is

🚨 A sneaky oversight in vm2 prior to version 3.10.2 can let attackers slip out of the sandbox like a magician escaping a locked box! 🔥 Think of vm2 as a high-security restaurant kitchen. The proper ingredients (sandboxed code) are supposed to stay inside, but with this vulnerability, a crafty cook can sneak out and grab any item from the pantry (run arbitrary code) without anyone noticing! An attacker could potentially break out of the sandbox and execute arbitrary code on the server, turning your secure environment into a free-for-all. This could lead to unauthorized access to sensitive data, malicious modifications, and a wave of havoc in your application!

Put simply

Think of vm2 as a high-security restaurant kitchen. The proper ingredients (sandboxed code) are supposed to stay inside, but with this vulnerability, a crafty cook can sneak out and grab any item from the pantry (run arbitrary code) without anyone noticing! This vulnerability arises because the sanitation of callbacks in `globalPromise.prototype.then` is missing, allowing attackers to bypass the protective measures put in place by the `localPromise.prototype.then` sanitization. As a result, the return value of async functions can access the global context.

What to do

An attacker could potentially break out of the sandbox and execute arbitrary code on the server, turning your secure environment into a free-for-all. This could lead to unauthorized access to sensitive data, malicious modifications, and a wave of havoc in your application! Upgrade vm2 to version 3.10.2 immediately to patch this flaw. Review your implementation to ensure proper sandboxing practices are followed, and consider adding additional validation measures on user inputs to bolster security. You've got this! Follow these steps, and your applications will be safer in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01270 · 69.6th percentile
Weaknesses
CWE-693 · Protection Mechanism Failure; CWE-913 · Improper Control of Dynamically-Managed Code Resources; CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2026-01-26T21:32Z
EPSS history
Timeline
  • 26 JAN 21:32Z
    vm2 has a Sandbox Escape
    cvelistv5