CVE-2026-25520: Sandbox escape in SandboxJS via unwrapped function return values
- Vendor
- Nyariv
CVE-2026-25520 is a critical sandbox escape vulnerability in SandboxJS, a JavaScript sandboxing library. In affected versions prior to 0.8.29, return values produced by functions are not wrapped by the library’s sandbox protections. This allows attacker-controlled code running inside the sandbox to use Object.values or Object.entries to obtain an Array containing the host environment’s Function constructor. By then using Array.prototype.at to retrieve that constructor, the attacker can invoke the host Function constructor directly and execute arbitrary code outside the intended sandbox boundary. The flaw therefore breaks the core isolation guarantees of SandboxJS and enables execution in the host context rather than the restricted sandbox context.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation results in complete sandbox escape and arbitrary code execution in the host environment. Because the vulnerability crosses the sandbox trust boundary, it can expose the confidentiality, integrity, and availability of the host process and any resources accessible to it. Depending on how SandboxJS is deployed, this can enable execution of attacker-supplied JavaScript with the privileges of the hosting application, bypass of security policy restrictions, access to sensitive data available to the host context, and potential service compromise.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, do not use vulnerable SandboxJS versions to execute untrusted code. Where use cannot be avoided, place sandboxed execution inside a stronger isolation boundary such as a separate container or virtual machine with minimal privileges, restricted filesystem access, constrained process capabilities, and tightly controlled network egress. Reduce the privileges of the hosting service and isolate sensitive secrets and host resources to limit the impact of a sandbox escape.
Remediation
Patch, then assume compromise.
Upgrade SandboxJS to version 0.8.29 or later. Version 0.8.29 contains the vendor fix for this issue. Any deployment using SandboxJS 0.8.28 or earlier to execute untrusted or semi-trusted JavaScript should be treated as vulnerable and updated on an urgent basis.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-25520 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2026-25520?
- Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2026-25520.
- Is there a patch for CVE-2026-25520?
- Upgrade SandboxJS to version 0.8.29 or later. Version 0.8.29 contains the vendor fix for this issue.
- What products are affected by CVE-2026-25520?
- Nyariv Sandboxjs.
- How severe is CVE-2026-25520?
- CVE-2026-25520 has a CVSS v3.1 score of 10.0 (Critical) and an EPSS score of 0.85% (59th percentile) as of Oct 16, 2026.
Recent activity
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.