Critical vm2 Node.js Flaw Allows Sandbox Escape and Arbitrary Code Execution
好的,我现在需要帮用户总结一篇文章的内容,控制在100个字以内。首先,我得仔细阅读文章,理解主要信息。 文章讲的是vm2这个Node.js库发现了一个严重的漏洞,CVE-2026-22709,CVSS评分9.8。这个漏洞允许攻击者逃逸沙盒,执行任意代码。问题出在Promise处理函数的不正确清理上。 接着,文章提到vm2近年来频繁出现类似问题,甚至导致项目一度被废弃,但现在又恢复维护。作者建议用户升级到最新版本,并考虑使用更安全的替代品如isolated-vm。 总结的时候要抓住关键点:漏洞名称、影响、原因、解决方案和建议。控制在100字以内,避免使用“文章内容总结”之类的开头。 现在组织语言:vm2发现高危漏洞,CVSS 9.8分,因Promise处理不当导致沙盒逃逸。已修复至3.10.3版,并建议使用更安全的替代方案。 这样应该符合用户的要求了。 </think> vm2 Node.js库发现高危漏洞(CVE-2026-22709),CVSS评分9.8分。该漏洞源于Promise处理函数的不正确清理,允许攻击者逃逸沙盒并执行任意代码。已修复至3.10.3版本,并建议用户升级或考虑更安全的替代方案如isolated-vm。 2026-1-28 14:1:0 Author: thehackernews.com(查看原文) 阅读量:0 收藏

Vulnerability / Open Source

A critical sandbox escape vulnerability has been disclosed in the popular vm2 Node.js library that, if successfully exploited, could allow attackers to run arbitrary code on the underlying operating system.

The vulnerability, tracked as CVE-2026-22709, carries a CVSS score of 9.8 out of 10.0 on the CVSS scoring system.

"In vm2 for version 3.10.0, Promise.prototype.then Promise.prototype.catch callback sanitization can be bypassed," vm2 maintainer Patrik Simek said. "This allows attackers to escape the sandbox and run arbitrary code."

vm2 is a Node.js library used to run untrusted code within a secure sandboxed environment by intercepting and proxying JavaScript objects to prevent sandboxed code from accessing the host environment.

Cybersecurity

The newly discovered flaw stems from the library's improper sanitization of Promise handlers, which creates an escape vector that results in the execution of arbitrary code outside the sandbox boundaries.

"The critical insight is that async functions in JavaScript return `globalPromise` objects, not `localPromise` objects. Since `globalPromise.prototype.then` and `globalPromise.prototype.catch` are not properly sanitized (unlike `localPromise`)," Endor Labs researchers Peyton Kennedy and Cris Staicu said.

While CVE-2026-22709 has been addressed in vm2 version 3.10.2, it's the latest in a steady stream of sandbox escapes that have plagued the library in recent years. This includes CVE-2022-36067, CVE-2023-29017, CVE-2023-29199, CVE-2023-30547, CVE-2023-32314, CVE-2023-37466, and CVE-2023-37903.

The discovery of CVE-2023-37903 in July 2023 also led Simek to announce that the project was being discontinued. However, these references have since been removed from the latest README file available on its GitHub repository. The Security page has also been updated as of October 2025 to mention that vm2 3.x versions are being actively maintained.

However, vm2's maintainer has also acknowledged that new bypasses will likely be discovered in the future, urging users to make sure that they keep the library up to date and consider other robust alternatives, such as isolated-vm, for stronger isolation guarantees.

Cybersecurity

"Instead of relying on the problematic vm model, the successor to vm2, isolated-vm relies on V8's native Isolate interface, which offers a more solid foundation, but even then, the maintainers of vm2 stress the importance of isolation and actually recommend Docker with logical separation between components," Semgrep said.

In light of the criticality of the flaw, users are recommended to update to the most recent version (3.10.3), which comes with fixes for additional sandbox escapes.

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.


文章来源: https://thehackernews.com/2026/01/critical-vm2-nodejs-flaw-allows-sandbox.html
如有侵权请联系:admin#unsafe.sh