CVE-2026-22709 vm2 has a Sandbox Escape

Critical 9.8 Published Updated

Attackers can escape the vm2 sandbox and execute arbitrary code by bypassing Promise callback sanitization in Node.js applications.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-22709?

CVE-2026-22709 is a critical code injection vulnerability in patriksimek vm2, published on 26 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-94, CWE-913, CWE-693

Which versions are affected by CVE-2026-22709?

2 open source packages ship an affected version, including vm2. It affects 1 product.

PackageAffectedFixed in
vm2 npmAll versions3.10.2
vm2 npmAll versions3.10.2

Products include Vm2 Project Vm2.

How do I fix CVE-2026-22709?

Upgrade vm2 to 3.10.2 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-22709 being exploited?

There is no known exploitation of CVE-2026-22709 in the wild and no public exploit code.

Sources

Also known as GHSA-99p7-6v5w-7xg8, ROOT-APP-NPM-CVE-2026-22709.

Is CVE-2026-22709 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free