Null-proto throw write-through via bridge from()

fix(GHSA-9vg3-4rfj-wgcm): null-proto throw write-through via bridge from()
Null-proto throw write-through via bridge from()c33c2b-fix-null-proto-throw-write-through-via-bridge-from-cve-2026-44009fixnull proto throw write through via

Committed by patriksimek

commit message
fix(GHSA-9vg3-4rfj-wgcm): null-proto throw write-through via bridge from()

handleException and globalPromise.prototype.then onFulfilled wrapped
caught/resolved values with bridge.from(). from() builds a sandbox-side
proxy whose target the bridge treats as host-realm; when called on a
sandbox-realm null-proto value, the proxy's set trap unwraps incoming
sandbox proxies of host references back to raw host originals and stores
them on the underlying sandbox object. The original sandbox reference
then yields the raw host fn -> .constructor is host Function -> RCE.
 
Three callsites in lib/setup-sandbox.js reverted to ensureThis() (the
pre-b57ac2d behavior, sandbox-realm safe). The host-Promise rejection
sanitizer composes from() outside handleException so the GHSA-mpf8
invariant -- host null-proto rejection values reach sandbox callbacks
bridge-wrapped, not raw -- is preserved.
 
Repro: test/ghsa/GHSA-9vg3-4rfj-wgcm/repro.js (7 tests, all pass after
fix; 3 fail without it). ATTACKS.md gains Category 26.

Editor assessment

This commit patches CVE-2026-44009. The body reconstructs a subtle chain: from() builds a sandbox proxy the bridge treats as host-realm, and its set trap on a sandbox null-proto value unwraps host proxies back to raw host functions, so the original reference exposes Function and RCE. It then explains the revert of three callsites to ensureThis, the pre-b57ac2d precedent, and why the GHSA-mpf8 invariant survives composition. Test counts—seven passing, three failing without the fix—and the ATTACKS.md category are cited. Only the header disappoints: GHSA-9vg3-4rfj-wgcm is used as a scope, and the subject's 'throw write-through' phrasing is dense. Acceptable.

Browse categories

More fix examples · Back to search