Sanitize revisited host AggregateError/SuppressedError carriers

fix(GHSA-x965-fc75-jpqh): sanitize revisited host AggregateError/SuppressedError carriers
Sanitize revisited host AggregateError/SuppressedError carriersc8c232-fix-sanitize-revisited-host-aggregateerror-suppressederror-carri-cve-2026-92934fixsanitize revisited host aggregateerror suppressederror carriers

Committed by patriksimek-bot

commit message
fix(GHSA-x965-fc75-jpqh): sanitize revisited host AggregateError/SuppressedError carriers

Incomplete-fix bypass of GHSA-m283-3h24-438v. handleException's cycle memo
in lib/setup-sandbox.js stored a presence bit and returned the raw host
carrier on revisit — safe for seal-in-place carriers, but the
AggregateError/SuppressedError handlers rebuild rather than seal, so a
carrier revisited within one traversal (self-cycle agg.errors=[agg],
duplicate [shared,shared], mutual a<->b) had its live host proxy
re-embedded into the rebuilt errors[], leaking a reachable host reference
to the sandbox on the caught-exception channel (host RCE).
 
Fix (lib/setup-sandbox.js): the memo now maps each carrier to exactly what
a revisit must return — itself when sealed in place, its sandbox-realm
replacement when rebuilt. Host-wrapped aggregate/suppressed carriers use a
two-phase build (construct empty replacement, register it in visited before
recursing so every cycle terminates on the replacement, then install
sanitized children via localReflectDefineProperty); attacker own-props are
dropped by construction. The sanitizeHostOwnProps rebuild is memoized too,
and a _blockHostWrapped backstop replaces any element still host-wrapped
after recursion with a neutral sandbox Error. Restores Defense Invariant #3
(no live host reference survives the caught-exception sanitizer).
 
Tests: test/ghsa/GHSA-x965-fc75-jpqh/repro.js (12 cases) and
adversarial.js (11 compound bypass attempts).
Docs: ATTACKS.md Category 49 (extends Category 38) + How The Bridge Defends
row; CHANGELOG under [Unreleased]. Version unchanged (release-pass step).

Editor assessment

This commit patches CVE-2026-92934. Detailed body on the revisited-carrier memo: the presence bit returned a live host proxy for rebuilt AggregateError/SuppressedError carriers, and the fix maps each carrier to what a revisit must return, builds replacements in two phases, and adds a host-wrapped backstop. Precise and well tested. The GHSA-id scope is the compliance flaw that caps the score. Style-wise the body is precise and readable; the GHSA identifier used as a scope is the sole CCv1 issue. The two-phase rebuild is well described; a sentence on the observable symptom (host reference leakage) would help readers prioritize.

Browse categories

More fix examples · Back to search