Skip to content
OpenAdvisories
Medium · 6.8 CVE-2026-100722 EUVD-2026-87857GHSA-2v2p-6j97-cjg9GHSA-7rr2-8fr3-fjqx

vm2 before 3.12.2 Host Process Termination via Construct Trap

Published Sep 27, 2026 · Updated Sep 28, 2026 · Assigned by VulnCheck

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.

Affected products

VendorProductAffectedFixed
patriksimek vm2 < 3.12.2 3.12.2

Affected packages

EcosystemPackageAffectedFixedRecord
npm vm2 < 3.12.2 3.12.2 GHSA-2v2p-6j97-cjg9

Advisories 1

References