SandboxJS sandbox escape via host prototype pollution
CVE-2026-25881 is a sandbox escape vulnerability in SandboxJS affecting versions prior to 0.8.31. The flaw is caused by improper handling of SandboxJS's isGlobal protection marker: when a protected host global prototype reference such as Map.prototype or Set.prototype is inserted into an array literal and later retrieved, the protection taint is stripped. This laundering of the protection state allows sandboxed code to directly modify host built-in prototypes from within the sandbox. The result is persistent host-side prototype pollution that breaks sandbox isolation and can alter subsequent host application behavior. In applications that later consume polluted properties in sensitive execution paths, the flaw can be leveraged toward remote code execution.
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 allows untrusted sandboxed JavaScript to escape intended isolation boundaries and persistently mutate host built-in prototypes. This can corrupt application logic across the host process, affect subsequently created objects, and create attacker-controlled behavior in downstream code paths. Where the host application uses polluted properties in sensitive sinks, exploitation may lead to arbitrary command execution and effective full compromise of the host application context. Integrity impact is high due to persistent prototype mutation, confidentiality impact can be high if polluted execution paths expose secrets or privileged data, and availability may also be affected through application instability or denial of service.
If you can’t patch tonight, do this now.
If immediate patching is not possible, reduce exposure by avoiding execution of untrusted JavaScript in the same process as sensitive application logic. Run untrusted code in a separate process, container, or similarly isolated environment with minimal privileges. As a defense-in-depth measure, freeze or otherwise harden built-in prototypes before executing untrusted code, recognizing potential compatibility impact. Audit host code for dangerous gadget paths that consume attacker-influenced object properties in sensitive sinks such as command execution, dynamic code loading, or evaluation, and refactor those paths to avoid trust in inherited or user-controlled properties.
Patch, then assume compromise.
Upgrade SandboxJS to version 0.8.31 or later. The fixed release preserves the relevant protection state across array operations and blocks the prototype-mutation path that enabled the escape. After upgrading, review any applications that executed untrusted code with vulnerable versions to determine whether host prototypes may have been modified during prior execution and restart affected processes as needed to clear polluted runtime state.
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.
14 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.