{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-23830","id":"CVE-2026-23830","title":"SandboxJS has Sandbox Escape via Unprotected AsyncFunction Constructor","description":"SandboxJS is a JavaScript sandboxing library. Versions prior to 0.8.26 have a sandbox escape vulnerability due to `AsyncFunction` not being isolated in `SandboxFunction`. The library attempts to sandbox code execution by replacing the global `Function` constructor with a safe, sandboxed version (`SandboxFunction`). This is handled in `utils.ts` by mapping `Function` to `sandboxFunction` within a m","descriptionLong":"SandboxJS is a JavaScript sandboxing library. Versions prior to 0.8.26 have a sandbox escape vulnerability due to `AsyncFunction` not being isolated in `SandboxFunction`. The library attempts to sandbox code execution by replacing the global `Function` constructor with a safe, sandboxed version (`SandboxFunction`). This is handled in `utils.ts` by mapping `Function` to `sandboxFunction` within a map used for lookups. However, before version 0.8.26, the library did not include mappings for `AsyncFunction`, `GeneratorFunction`, and `AsyncGeneratorFunction`. These constructors are not global properties but can be accessed via the `.constructor` property of an instance (e.g., `(async () => {}).constructor`). In `executor.ts`, property access is handled. When code running inside the sandbox accesses `.constructor` on an async function (which the sandbox allows creating), the `executor` retrieves the property value. Since `AsyncFunction` was not in the safe-replacement map, the `executor` returns the actual native host `AsyncFunction` constructor. Constructors for functions in JavaScript (like `Function`, `AsyncFunction`) create functions that execute in the global scope. By obtaining the host `AsyncFunction` constructor, an attacker can create a new async function that executes entirely outside the sandbox context, bypassing all restrictions and gaining full access to the host environment (Remote Code Execution). Version 0.8.26 patches this vulnerability.","published":"2026-01-27T23:32:16.104Z","updated":"2026-10-28T02:30:39.696476788Z","reserved":"2026-01-16T15:46:40.841Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},"metrics":[{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub_M"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"github.com"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":10,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","rating":"critical","source":"GitHub"}],"rating":"critical","products":["nyariv SandboxJS"],"affectedProducts":[{"vendor":"nyariv","product":"SandboxJS","defaultStatus":null,"versions":[{"version":"< 0.8.26","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"@nyariv/sandboxjs","purl":"pkg:npm/%40nyariv/sandboxjs","ranges":["<0.8.26"],"fixed":["0.8.26"],"advisory":"GHSA-wxhw-j4hc-fmq6"}],"cwes":["CWE-94","CWE-693","CWE-913"],"aliases":["GHSA-wxhw-j4hc-fmq6"],"references":[{"url":"https://github.com/nyariv/SandboxJS/security/advisories/GHSA-wxhw-j4hc-fmq6","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/nyariv/SandboxJS/commit/345aee6566e47979dee5c337b925b141e7f78ccd","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23830.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23830","tags":["advisory"]},{"url":"https://github.com/nyariv/SandboxJS","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total"},"epss":0.01219,"epssPercentile":0.69253,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-23830","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23830","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-23830","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-wxhw-j4hc-fmq6","ok":true,"note":"GHSA-wxhw-j4hc-fmq6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-23830","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}