Restore Node 8, broken by fe71e2b's explicit sealed-slot attributes

fix: restore Node 8, broken by fe71e2b's explicit sealed-slot attributes
Restore Node 8, broken by fe71e2b's explicit sealed-slot attributes910344-fix-restore-node-8-broken-by-fe71e2b-cve-2026-100721fixrestore node broken fe71e2b explicit sealed

Committed by patriksimek-bot

commit message
fix: restore Node 8, broken by fe71e2b's explicit sealed-slot attributes

CI has been red on main since fe71e2b. The cause was not the Proxy
assignment that commit removed -- it was the change it made for
readability, spelling out `writable: false, configurable: false` on the
Error/Promise/Proxy slots instead of relying on the identical spec
defaults.
 
Those forms are equivalent on a current V8. They are not equivalent on
the Node 8 global proxy, where only the explicit form actually seals the
slot. Sealing it stopped the Proxy install below from taking effect,
which removed Proxy from Node 8 sandboxes and broke six tests. fe71e2b
claimed no behaviour change; that was wrong.
 
Measured on a real Node 8.17.0 rather than inferred:
 
  Node 8   slot writable; [[Set]] works, [[DefineOwnProperty]] returns
           true and stores nothing. Only a plain assignment installs.
  Node 10+ slot sealed; the write is a silent no-op.
  JSC/Bun  slot sealed; the write throws and aborts sandbox setup.
 
So: omit the attributes again (with a comment saying why they must stay
omitted), and wrap the assignment in try/catch so it cannot abort setup
on an engine that implements the write correctly. Failure means no Proxy
in the sandbox -- strictly more restrictive, never less.
 
The source guard from fe71e2b is rewritten accordingly: it no longer
forbids the write, it requires the write to be guarded. The two
sealed-slot descriptor tests are gated to Node >= 10, where the seal
actually takes.
 
Verified against the 525961b baseline on real interpreters: Proxy is a
function on Node 8 and undefined on Node 10/26, exactly as before, with
escapes blocked throughout. legacy-runner exit 0 on Node 8 (663), 10
(685), 12 (701), 18 (786); npm test 822 passing / 0 failing on Node 26.
 
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019WkP1bS6AnjpEpmSLemf2c

Editor assessment

This commit patches CVE-2026-100721. Excellent debugging narrative. The body explains that the CI breakage came from spelling out writable/configurable on sealed slots, that Node 8's global proxy seals differently, and it documents measured behavior on Node 8, Node 10+, JSC and Bun before describing the guarded assignment and the gated tests. The subject embeds a commit hash, a minor style flaw, but the explanation is strong. Formally the header is clean apart from the embedded commit hash; the body is a well-separated debugging narrative and needs no structural work.

Browse categories

More fix examples · Back to search