TL;DR: A critical vm2 flaw in versions 3.10.1 and earlier lets attackers bypass Promise sanitisation and execute arbitrary code on the host, with StepSecurity citing a CVSS 9.8 severity and urging immediate upgrade to 3.10.2 or later. The real lesson is that sandbox boundaries are only as strong as their object handling and dependency governance.
Editorial analysis by NHI Mgmt Group, based on content published by StepSecurity: “CVE-2026-22709: Critical Sandbox Escape Vulnerability in vm2”.
Key questions
Q: What breaks when a JavaScript sandbox fails to sanitise all Promise paths?
A: The entire containment model breaks, because untrusted code can cross from restricted execution into host-level execution through the unsanitised path.
Q: Why do sandbox escapes create risk even when the vulnerable package is only a dependency?
A: Because the security boundary is enforced by the dependency itself.
Q: What signs suggest an untrusted-code execution control is failing in practice?
A: The clearest signs are inconsistent behaviour across runtime object types, unexpected access outside the intended sandbox, and package inventories that cannot confirm which projects still depend on the vulnerable library.
Practitioner guidance
- Inventory every vm2 deployment and transitive dependency Locate all direct and indirect uses of vm2 across repositories, build pipelines, and runtime images, then confirm whether any instance remains on 3.10.1 or earlier.
- Upgrade to the patched vm2 release immediately Move affected systems to vm2 3.10.2 or later and verify the installed version after deployment rather than assuming the package manager resolved every instance.
- Review whether sandboxing is still necessary Remove vm2 from workflows that no longer require execution of untrusted code, because every unused sandbox expands the attack surface and patch burden.
Bottom line: Vm2's sandbox escape shows that untrusted-code containment fails when Promise handling is inconsistent across runtime object types.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Dependency trust collapses the moment a sandbox library stops enforcing boundaries uniformly. vm2 is meant to isolate untrusted code, but inconsistent Promise sanitisation shows how a single missed object path can invalidate the whole trust model. For practitioners, the key point is that containment controls must be validated at the runtime boundary, not inferred from the library's purpose.
A question worth separating out:
Q: What should teams do when a sandbox library is found vulnerable in production?
A: Contain the affected workloads, upgrade the library version, and verify that no transitive dependency reintroduces the vulnerable code path. Then review the runtime privileges of the affected service so a future escape cannot immediately reach sensitive data or control planes. That sequence limits blast radius before the patch is fully absorbed across environments.
👉 Read our full editorial: vm2 sandbox escape shows how dependency trust can collapse