Refuse to deliver the host global into the sandbox
fix(GHSA-j89j-5m6r-cr2q): refuse to deliver the host global into the sandbox
Refuse to deliver the host global into the sandbox3d701a-fix-refuse-to-deliver-the-host-global-cve-2026-93603fixrefuse deliver host global sandbox ghsa
Committed by patriksimek-bot
commit message
fix(GHSA-j89j-5m6r-cr2q): refuse to deliver the host global into the sandbox
Root cause: an embedder-exposed sloppy-mode host function called from the
sandbox with a nullish receiver gets V8's OrdinaryCallBindThis
substitution of the host realm's global object for its `this`, and the
bridge wrapped and delivered that global like any other host object, so
`greet().process.getBuiltinModule('child_process')` was host RCE.
Fix (lib/bridge.js): cache the host realm's global at bridge init
(`global`, not `globalThis`, for Node 8) and refuse it at the three
host->sandbox coercion chokepoints (thisFromOtherWithFactory,
thisEnsureThis, thisFromOtherForThrow), returning undefined before the
mappingOtherToThis cache lookup. One identity check covers every delivery
path and preserves strict-mode `this === undefined`. Restores Defense
Invariant #1.
Tests: test/ghsa/GHSA-j89j-5m6r-cr2q/repro.js (7 vectors).
Docs: new Category 54 in docs/attacks/host-reference-primitives.md
(renumbered from the branch's 53, which 6454 now holds), index row,
compound pattern 31, defends-table row; CHANGELOG [Unreleased].
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DNJCz7eZo8seYyQDd11EmbEditor assessment
This commit patches CVE-2026-93603. The body explains the sloppy-mode this-substitution that delivered the host global into the sandbox, the resulting getBuiltinModule('child_process') RCE, and the cached-global identity check at three coercion chokepoints that preserves strict-mode this === undefined. Seven vectors back it up. The GHSA-id scope is the one formal violation, so the message stops at 3. The strict-mode preservation is the subtle part; a note on why undefined must survive would deepen the explanation.