Details
The root-cause control is strong:
node --no-proto-assign-seq-opt poc.js
On Node.js 26.7.0 this changes the result from HOST to SAFE (3/3). A separate semantic probe also changes from wrapperCalls=0 to wrapperCalls=1.
Relationship to previous advisories
This report intentionally discloses the overlap with prior work:
CVE-2026-22709 / GHSA-99p7-6v5w-7xg8
That issue concerned bypassing callback sanitization on intrinsic Promises returned by async functions. vm2's fix added/strengthened the globalPromise.prototype.then and catch wrappers. The current issue is different: on V8 14.6, finally() trusts a stale protector and bypasses those installed wrappers at the engine fast path.
CVE-2026-47208 / GHSA-76w7-j9cq-rx2j
That issue used a missing resetPromiseSpecies call in localPromise's rejection-swallowing tail. It is marked fixed in 3.11.4. The current entry point is the intrinsic async Promise plus finally()/InvokeThen; the PoC succeeds against 3.11.4 and 3.11.5.
CVE-2026-47210 / GHSA-6j2x-vhqr-qr7q
That issue required a JSPI-backed Promise and WebAssembly APIs. Its 3.11.4 fix removes the relevant JSPI surface. The current PoC uses an ordinary fulfilled async-function Promise, works with wasm:false, and succeeds against 3.11.5.
Public V8 fix
The underlying V8 protector bookkeeping bug is already public and fixed upstream:
- data-property branch: https://github.com/v8/v8/commit/7b26e81087ec88c287d9a4812f969d412f32774e
- follow-up lazy-accessor branch: https://github.com/v8/v8/commit/4635ddd85839461c8ad791990023a477efefe7bd
This report does not claim discovery of a new V8 bug. It reports a previously undocumented, still-unpatched vm2 sandbox escape created by the interaction between that V8 bug and vm2's Promise hardening. The escape affects vm2's latest release and current main branch.
Impact
An attacker who can execute untrusted JavaScript inside a vm2 VM can cross the sandbox boundary and obtain the host Function constructor and process object. This permits arbitrary code execution with the privileges of the host Node.js process, including access to its filesystem, credentials, environment, network, and child-process facilities.
This is the exact security boundary vm2 is intended to enforce; no additional application mistake is required beyond executing attacker-controlled code in the sandbox.
Suggested remediation
- Install the intrinsic
thenandcatchwrappers through an operation that reliably invalidates V8's Promise lookup-chain protector, such as an appropriateReflect.defineProperty/Object.definePropertypath, instead of the optimizable consecutive direct-assignment sequence. - Wrap the intrinsic
Promise.prototype.finallyentry point and executeresetPromiseSpecies(this)before delegating to the cached nativefinallyimplementation. - Add a build/runtime regression test using an intrinsic Promise from
(async () => 1)(): an attacker-controlled own species must not be constructed byp.finally(). - Until a vm2 release is available, document Node.js 26 as affected or fail closed on the vulnerable runtime range.
- Coordinate with Node.js to backport the existing V8 protector fixes to the Node.js 26 release line.
Verified controls show that wrapping finally before calling the cached native implementation blocks the tested direct variants, while the upstream V8 fix also restores correct wrapper invocation.
Credit is requested as: YMsora. https://github.com/YMs0ra
Attachments
vm2-node26-finally-private-report.zip