Description
vm2 before 3.12.2 does not apply host-side Promise rejection handling in the sandbox-to-host construct trap. In BaseHandler, the apply trap calls markHostPromiseHandled() on the returned value, but the adjacent construct path returns the result of Reflect.construct without the same sanitization. If an embedder exposes a constructable host function whose constructor returns a native rejected Promise, an untrusted script executed via VM.run can invoke it with `new` and ignore the result; the rejected host Promise crosses the bridge unhandled and, under Node's strict unhandled-rejection policy, is promoted to an uncaught exception that terminates the host process.
Published: 2026-09-27
Score: 8.9 High
EPSS: n/a
KEV: No
Impact: Host process termination via unhandled rejection
Action: Patch Now
AI Analysis

Impact

The vulnerability exists in the vm2 sandbox library prior to version 3.12.2, where the construct trap omits host-side Promise rejection handling. When an embedder registers a constructable host function whose constructor returns a native rejected Promise, code executed in the sandbox can invoke this function with the JavaScript "new" operator, bypassing the missing sanitization. The rejected Promise propagates across the VM boundary as unhandled, and Node.js’s strict unhandled‑rejection policy causes it to be escalated to an uncaught exception, which terminates the host process. The attacker therefore gains the ability to force a sandboxed script to shut down the entire Node.js application without needing elevated privileges within the host environment.

Affected Systems

This issue affects the patriksimek:vm2 package in every release before 3.12.2. Hosts that embed vm2 and run untrusted code via VM.run or a similar API are at risk. The vulnerability is independent of the host application's version but becomes mitigated once the library is updated to 3.12.2 or later.

Risk and Exploitability

The CVSS score of 8.9 classifies the flaw as high severity. While the EPSS score is not available, the nature of the flaw—allowing sandbox code to terminate the hosting process—makes exploitation likely in environments that run unchecked VM code. The vulnerability is not listed in the CISA KEV catalog, but its impact on process availability and the ease of triggering it via a constructable host function warrant immediate attention. The most probable attack vector is the execution of untrusted JavaScript within a vm2 sandbox that can call a host function returning a rejected Promise.

Generated by OpenCVE AI on September 27, 2026 at 04:00 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade vm2 to version 3.12.2 or later to apply proper host‑Promise handling in the construct trap.
  • If upgrading is not immediately possible, ensure that any constructable host functions do not return Promise objects, or wrap them in a safe constructor that resolves normally.
  • Configure the Node.js process to avoid strict unhandled‑rejection escalation by using the --unhandled-rejections=none flag or installing a global unhandledRejection handler to contain the error level.

Generated by OpenCVE AI on September 27, 2026 at 04:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 27 Sep 2026 03:30:00 +0000

Type Values Removed Values Added
First Time appeared Patriksimek
Patriksimek vm2
Vendors & Products Patriksimek
Patriksimek vm2

Sun, 27 Sep 2026 02:00:00 +0000

Type Values Removed Values Added
Description vm2 before 3.12.2 does not apply host-side Promise rejection handling in the sandbox-to-host construct trap. In BaseHandler, the apply trap calls markHostPromiseHandled() on the returned value, but the adjacent construct path returns the result of Reflect.construct without the same sanitization. If an embedder exposes a constructable host function whose constructor returns a native rejected Promise, an untrusted script executed via VM.run can invoke it with `new` and ignore the result; the rejected host Promise crosses the bridge unhandled and, under Node's strict unhandled-rejection policy, is promoted to an uncaught exception that terminates the host process.
Title vm2 before 3.12.2 Host Process Termination via Construct Trap
Weaknesses CWE-248
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H'}

cvssV4_0

{'score': 8.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-09-27T01:28:29.295Z

Reserved: 2026-09-26T02:40:56.226Z

Link: CVE-2026-100722

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-09-27T02:17:18.817

Modified: 2026-09-27T02:17:19.200

Link: CVE-2026-100722

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-27T04:15:08Z

Weaknesses