LmCast :: Stay tuned in

Critical sandbox escape flaw found in popular vm2 NodeJS library

Recorded: Jan. 27, 2026, 6 p.m.

Original Summarized

Critical sandbox escape flaw found in popular vm2 NodeJS library

News

Featured
Latest

New ClickFix attacks abuse Windows App-V scripts to push malware

Microsoft patches actively exploited Office zero-day vulnerability

Nearly 800,000 Telnet servers exposed to remote attacks

Cloudflare misconfiguration behind recent BGP route leak

OpenAI's ChatGPT ad costs are on par with live NFL broadcasts

Fortinet blocks exploited FortiCloud SSO zero day until patch is ready

Chinese Mustang Panda hackers deploy infostealers via CoolClient backdoor

WinRAR path traversal flaw still exploited by numerous hackers

Tutorials

Latest
Popular

How to access the Dark Web using the Tor Browser

How to enable Kernel-mode Hardware-enforced Stack Protection in Windows 11

How to use the Windows Registry Editor

How to backup and restore the Windows Registry

How to start Windows in Safe Mode

How to remove a Trojan, Virus, Worm, or other Malware

How to show hidden files in Windows 7

How to see hidden files in Windows

Webinars
Downloads

Latest
Most Downloaded

Qualys BrowserCheck

STOPDecrypter

AuroraDecrypter

FilesLockerDecrypter

AdwCleaner

ComboFix

RKill

Junkware Removal Tool

Deals

Categories

eLearning

IT Certification Courses

Gear + Gadgets

Security

VPNs

Popular

Best VPNs

How to change IP address

Access the dark web safely

Best VPN for YouTube

Forums
More

Virus Removal Guides
Startup Database
Uninstall Database
Glossary
Send us a Tip!
Welcome Guide

HomeNewsSecurityCritical sandbox escape flaw found in popular vm2 NodeJS library

Critical sandbox escape flaw found in popular vm2 NodeJS library

By Bill Toulas

January 27, 2026
11:35 AM
0

A critical-severity vulnerability in the vm2 Node.js sandbox library, tracked as CVE-2026-22709, allows escaping the sandbox and executing arbitrary code on the underlying host system.
The open-source vm2 library creates a secure context to allow users to execute untrusted JavaScript code that does not have access to the filesystem.
vm2 has historically been seen in SaaS platforms that support user script execution, online code runners, chatbots, and open-source projects, being used in more than 200,000 projects on GitHub. The project was discontinued in 2023, though, due to repeated sandbox-escape vulnerabilities, and considered unsafe for running untrusted code.

Last October, maintainer Patrik Šimek decided to resurrect the vm2 project and release version 3.10.0 that addressed all vulnerabilities known at the time and "still compatible all the way back to Node 6."
The library continues to be very popular on the npm platform, constantly reaching around one million downloads every week for the past year.
Improper sanitization
The latest vulnerability arises from vm2’s failure to properly sandbox ‘Promises’, the component that handles asynchronous operations to make sure code execution is restricted to the context of the isolated environment.
While vm2 sanitizes callbacks attached to its own internal Promise implementation, async functions return a global Promise whose .then() and.catch() callbacks are not properly sanitized.
"In vm2 for version 3.10.0, Promise.prototype.then Promise.prototype.catch callback sanitization can be bypassed," the project maintainer says, adding that "this allows attackers to escape the sandbox and run arbitrary code."
According to the developer, the CVE-2026-22709 sandbox escape was partially addressed in vm2 version 3.10.1, while in the subsequent 3.10.2 update the developer tightened the fix to avoid a potential bypass.
The developer also shared code demonstrating how CVE-2026-22709 could be triggered in the vm2 sandbox to escape it and execute a command on the host system.

The published exploit snippetSource: GitHub
Given that CVE-2026-22709 is trivial to exploit in vulnerable vm2 versions, users are recommended to upgrade to the latest release as soon as possible.
Previously reported critical sandbox escape flaws in vm2 include CVE-2022-36067, disclosed by researchers at Oxeye. Exploiting the bug allowed escaping the isolated environment and running commands on the host system.
In April 2023, a similar flaw, tracked as CVE-2023-29017, was discovered, and an exploit was published. Later that same month, researcher SeungHyun Lee released an exploit for CVE-2023-30547, yet another critical sandbox escape impacting vm2.
Šimek told BleepingComputer that "all disclosed vulnerabilities are properly fixed" in vm2 version 3.10.3, currently the most recent release.

Secrets Security Cheat Sheet: From Sprawl to Control
Whether you're cleaning up old keys or setting guardrails for AI-generated code, this guide helps your team build securely from the start.
Get the cheat sheet and take the guesswork out of secrets management.
Download Now

Related Articles:
Hackers exploit critical telnetd auth bypass flaw to get rootChainlit AI framework bugs let hackers breach cloud environmentsCritical jsPDF flaw lets hackers steal secrets via generated PDFsMax severity Ni8mare flaw lets hackers hijack n8n serversShai-Hulud 2.0 NPM malware attack exposed up to 400,000 dev secrets

Library
npm
Open Source
Sandbox Escape
VM2
Vulnerability

Bill Toulas
Bill Toulas is a tech writer and infosec news reporter with over a decade of experience working on various online publications, covering open-source, Linux, malware, data breach incidents, and hacks.

Previous Article
Next Article

Post a Comment Community Rules

You need to login in order to post a comment
Not a member yet? Register Now

You may also like:

Popular Stories

Microsoft patches actively exploited Office zero-day vulnerability

Microsoft investigates Windows 11 boot failures after January updates

Microsoft releases emergency OOB update to fix Outlook freezes

Sponsor Posts

Exposure Management Index: Insights From 3,000+ Teams. Get The Report.

Overdue a password health-check? Audit your Active Directory for free

Get a free shadow AI inventory today

Discover how phishing kits are sold and deployed. Download the full research report.

Is your data already on a leak site? Monitor your exposure threats for free.

  Upcoming Webinar

Follow us:

Main Sections

News
Webinars
VPN Buyer Guides
SysAdmin Software Guides
Downloads
Virus Removal Guides
Tutorials
Startup Database
Uninstall Database
Glossary

Community

Forums
Forum Rules
Chat

Useful Resources

Welcome Guide
Sitemap

Company

About BleepingComputer
Contact Us
Send us a Tip!
Advertising
Write for BleepingComputer
Social & Feeds
Changelog

Terms of Use - Privacy Policy - Ethics Statement - Affiliate Disclosure

Copyright @ 2003 - 2026 Bleeping Computer® LLC - All Rights Reserved

Login

Username

Password

Remember Me

Sign in anonymously

Sign in with Twitter

Not a member yet? Register Now


Reporter

Help us understand the problem. What is going on with this comment?

Spam

Abusive or Harmful

Inappropriate content

Strong language

Other

Read our posting guidelinese to learn what content is prohibited.

Submitting...
SUBMIT

A critical security vulnerability, tracked as CVE-2026-22709, has been identified within the vm2 Node.js sandbox library, presenting a significant risk of sandbox escape and arbitrary code execution on the host system. The vulnerability stems from the inadequate sanitization of Promises and their associated callbacks, specifically the `.then()` and `.catch()` methods, within vm2’s Promise implementation. While Patrik Šimek resurrected the project following repeated sandbox escape flaws, the core issue persisted.

The vulnerability allows an attacker to bypass the intended security boundaries of the sandbox environment. This bypass occurs because vm2 sanitizes callbacks attached to its internal Promise implementation, yet fails to correctly sanitize the global Promises returned by `async` functions. Consequently, the `.then()` and `.catch()` callbacks attached to these global Promises are vulnerable. Šimek demonstrated the exploit through a published GitHub code snippet, effectively showcasing the ease with which the vulnerability can be triggered.

The issue has a documented history, with prior critical vulnerabilities including CVE-2022-36067 (disclosed by Oxeye researchers) and CVE-2023-29017 and CVE-2023-30547, all enabling sandbox escape and host system command execution. Šimek states that all disclosed vulnerabilities are now addressed in the current version of vm2 (3.10.3).

The root cause lies in the library’s reliance on sanitizing callbacks within its own internal Promise implementation, while neglecting to sanitize the global Promises returned by `async` functions. The presence of `.then()` and `.catch()` callbacks on these global Promises provides the avenue for exploitation. Patrik Šimek’s original decision to revive the project, while intending to address the issues, inadvertently preserved the exploitable core of the library.

The widespread use of vm2, with over 200,000 projects utilizing it on GitHub and a weekly download count of approximately one million, amplifies the potential impact of this vulnerability. Users are strongly advised to upgrade to the latest version (3.10.3) without delay. The ease of exploitation, as demonstrated by the published code snippet, underscores the urgency of remediation. The legacy of previous vulnerabilities further emphasizes the need for vigilance within projects leveraging the vm2 library, particularly those using older versions.