CVE-2026-22686: Host Realm Error Sandbox Prototype Chain Escape

Throwing a host-realm `new Error()` at a VM/sandbox boundary exposes the full host prototype chain to sandboxed code. Sandboxed code catching this Error can traverse Error -> Error.prototype -> Error constructor -> Function constructor to reach the host Function constructor and execute arbitrary JavaScript in the host process, achieving full sandbox escape (

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0TS
greprules fetch cve-2026-22686-host-realm-error-sandbox-prototype-chain-escape --engine opengrep

Description

Throwing a host-realm `new Error()` at a VM/sandbox boundary exposes the full host prototype chain to sandboxed code. Sandboxed code catching this Error can traverse Error -> Error.prototype -> Error constructor -> Function constructor to reach the host Function constructor and execute arbitrary JavaScript in the host process, achieving full sandbox escape (