NetSight
high6.8No CVE yet

GHSA-7rr2-8fr3-fjqx

Duplicate Advisory: vm2: Host Promise rejection from an exposed constructor can terminate the vm2 host process

Impact

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-2v2p-6j97-cjg9. This link is maintained to preserve external references. ## Original 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.

An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: high risk of outages. The attack can reach beyond the vulnerable component itself.

Affected packages

EcosystemPackageAffectedFixed in
npmvm2< 3.12.23.12.2

Weakness classification

References