CVE-2026-5752: Pyodide Jsglobals Prototype Chain Escape

Plain JavaScript object literal (`{}`) used as a value in Pyodide's `jsglobals` option retains `Object.prototype` in its prototype chain. Sandboxed Python code can reach the exposed object via `import js`, traverse `.constructor.constructor` to obtain the host `Function` constructor, call `Function("return globalThis")()` to access the Node.js `globalThis`,

Provally CuratedPublic repositoryHighHigh confidenceVerifiedApache-2.0TS
greprules fetch cve-2026-5752-pyodide-jsglobals-prototype-chain-escape --engine opengrep

Description

Plain JavaScript object literal (`{}`) used as a value in Pyodide's `jsglobals` option retains `Object.prototype` in its prototype chain. Sandboxed Python code can reach the exposed object via `import js`, traverse `.constructor.constructor` to obtain the host `Function` constructor, call `Function("return globalThis")()` to access the Node.js `globalThis`,