vm2 Promise rejection denial of service

Severity: high · CVSS 8.6 · Published 2026-09-17

vm2 is a JavaScript sandbox library that lets applications safely run untrusted code in Node.js. A vulnerability allows sandboxed code to crash the host process by ignoring a Promise returned from host code, bypassing vm2's protections against unhandled promise rejections. This affects any application using vm2 to execute untrusted scripts, potentially enabling denial-of-service attacks.

Technologies: vm2 (npm), Patriksimek Vm2. Vendors: npm, Patriksimek.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
High severity, with a CVSS score of 8.6, published 17 September 2026.
Which products and versions are affected?
vm2 (npm) >= 3.10.0, <= 3.11.7; Patriksimek Vm2 3.10.0 through 3.11.7.
Is there a fix for This vulnerability?
Yes: fixed in 3.11.8. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network.
Am I affected?
Check whether you run vm2 (npm) or Patriksimek Vm2 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.

How to fix

  • Fixed in: 3.11.8

Technical details

Promises returned from the host realm into the sandbox are not marked as handled at the bridge boundary (versions 3.10.0–3.11.7). Sandboxed code can call a host function returning a rejected Promise and ignore the return value, leaving the host Promise unhandled so Node.js terminates the process. This is an incomplete fix of the prior unhandled-rejection hardening (GHSA-hw58-p9xv-2mjh), where only sandbox-created Promises were wrapped with rejection handlers, not host-returned Promises.

Affected products

  • patriksimek vm2 3.10.0 through 3.11.7

Timeline

  • 2026-08-27: disclosed
  • 2026-08-27: patched: Advisory GHSA-gjq8-xm47-88rc published
  • 2026-09-17: advisory: Duplicate advisory GHSA-mgj2-jqjq-q8gg published
  • 2026-10-05: other: Duplicate advisory withdrawn

References

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