Switch prelude to p.getPrototypeOf(p) (real exploit path)
test(GHSA-v37h-5mfm-c47c): switch prelude to p.getPrototypeOf(p) (real exploit path)
Switch prelude to p.getPrototypeOf(p) (real exploit path)bdd3d1-test-switch-prelude-to-p-getprototypeof-p-cve-2026-24781testswitch prelude getprototypeof real exploit path
Committed by patriksimek
commit message
test(GHSA-v37h-5mfm-c47c): switch prelude to p.getPrototypeOf(p) (real exploit path)
Original prelude used `Object.getPrototypeOf(p)` to obtain pp, which
goes through bridge sanitization and returns a sandbox-side
Object.prototype whose `.constructor` is sandbox Object — so
reconstruction variants failed trivially against an unfixed binary,
making the tests pass for the wrong reason. Switching to
`p.getPrototypeOf(p)` invokes the handler's own getPrototypeOf trap and
returns the real BaseHandler.prototype with `.set`/`.get`/`.constructor`
as live functions, so the suite now fails on unfixed code and passes on
the fix branch.Editor assessment
This commit patches CVE-2026-24781. This is a test-only correction with an unusually good story: the original prelude used Object.getPrototypeOf(p), which passed through bridge sanitization and returned a sandbox-side prototype, so variants failed trivially and the suite passed for the wrong reason. Switching to p.getPrototypeOf(p) hits the handler's own trap, exposes the live BaseHandler.prototype, and makes the tests fail on unfixed code. That is exactly the kind of subtle test-validity insight worth recording. The GHSA-as-scope header and the long parenthetical are the weak points, since neither names a module. Acceptable and genuinely informative.