Improper Control of Dynamically-Managed Code Resources Affecting vm2 package, versions <3.10.2


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.03% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-VM2-15116160
  • published27 Jan 2026
  • disclosed26 Jan 2026
  • creditUnknown

Introduced: 26 Jan 2026

CVE-2026-22709  (opens in a new tab)
CWE-913  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade vm2 to version 3.10.2 or higher.

Overview

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules.

Affected versions of this package are vulnerable to Improper Control of Dynamically-Managed Code Resources due to the unsafe usage of the .call() with globalPromise.prototype.then callback function. An attacker can execute arbitrary code outside the intended sandbox by overwriting Function.prototype.call inside the sandbox that bypass the intended security controls.

Note:

This issue can be mitigated by migrating to 'isolated-vm' for stronger isolation based on V8 Isolates and using OS-level isolation (Docker, gVisor, Firecracker) instead of application-level sandboxes.

CVSS Base Scores

version 4.0
version 3.1