Extend handleException to recurse into AggregateError.errors[]
fix(GHSA-55hx-c926-fr95): extend handleException to recurse into AggregateError.errors[]
Extend handleException to recurse into AggregateError.errors[]d715dd-fix-extend-handleexception-to-recurse-into-aggregateerror-cve-2026-26332fixextend handleexception recurse aggregateerror errors ghsa
Committed by patriksimek
commit message
fix(GHSA-55hx-c926-fr95): extend handleException to recurse into AggregateError.errors[]
Closes GHSA-55hx-c926-fr95.
Duplicate of: GHSA-35vh-489p-v7cx.
Primary closure for the canonical `ha.fromAsync(...).catch(...)` PoC is
transitive via the GHSA-grj5-jjm8-h35p class-E trap: the proxy
`.constructor` trap for host arrays now returns sandbox `Array`, so the
attacker's prototype walk lands on sandbox `Array.fromAsync` returning a
sandbox Promise that routes through the existing `handleException`
sanitization layer.
This commit adds one small gap fix: `handleException` now also detects
AggregateError and recursively sanitizes each `.errors[i]` through
`handleException`, mirroring the existing SuppressedError `.error` /
`.suppressed` recursion. Closes a latent path where a Promise.any
rejection delivers an AggregateError whose elements carry raw host
errors.Editor assessment
This commit patches CVE-2026-26332. The body carefully separates the mechanisms: the canonical fromAsync PoC closes transitively through the GHSA-grj5-jjm8-h35p class-E trap, while this commit contributes the smaller AggregateError recursion in handleException, mirroring SuppressedError handling so Promise.any rejections stop leaking raw host errors. Closes and 'Duplicate of:' footers are well formed and meaningful, which is more footer care than most messages here show. The header is the cap: GHSA-55hx-c926-fr95 occupies the scope position, pushing a 76-character subject past a reasonable length for a nested helper change. Solid content, mediocre framing.