Sandbox escape in SandboxJS via unwrapped function return values
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.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
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.
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.
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.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
9 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.