CVE-2026-45411: patriksimek vm2 sandbox escape via async generator yield* expression

CVE-2026-45411 · Severity: critical · CVSS 9.8 · Published 2026-05-13

vm2 is a Node.js sandbox used to safely execute untrusted code with restricted access to system modules. This vulnerability allows attackers to escape the sandbox and execute arbitrary commands on the host system by exploiting how async generators handle exceptions and thenable objects. An attacker who can run code inside a vm2 sandbox can break out and achieve full remote code execution on the underlying server.

Technologies: vm2 (npm), Red Hat Self-service automation portal. Vendors: npm, Red Hat.

Quick answers

Is CVE-2026-45411 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45411 being exploited in the wild.
How severe is CVE-2026-45411?
Critical severity, with a CVSS score of 9.8, published 13 May 2026.
Which products and versions are affected?
vm2 (npm) <= 3.11.2; Red Hat Self-service automation portal 2.
Is there a fix for CVE-2026-45411?
A patch was published on 2026-05-11: Patch released in version 3.11.3 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45411 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-45411?
Check whether you run vm2 (npm) or Red Hat Self-service automation portal at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability exists in vm2's async generator implementation. An attacker can use the yield* expression inside an async generator to catch host exceptions. When the generator is closed using the return function with a thenable object (one with a .then method), exceptions thrown during the thenable resolution are caught by the runtime and passed to the yield* iterator. This allows the attacker to access host-realm objects and bypass sandbox isolation. The proof-of-concept demonstrates using this technique to access the process object and execute shell commands via child_process.execSync. The fix, released in version 3.11.3, wraps the async generator prototype methods (next, return, throw) to sanitize both iterator-result values and thenable arguments, preventing V8's promise handling from detecting user-supplied thenables that could bridge the sandbox boundary.

Affected products

  • npm vm2 <= 3.11.2

Identifiers

  • CVE-2026-45411
  • GHSA-248r-7h7q-cr24

Timeline

  • 2026-05-14: disclosed: Vulnerability published
  • 2026-05-11: patched: Patch released in version 3.11.3

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.