CVE-2026-25586 in SandboxJS
Summary
by MITRE • 02/06/2026
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, a sandbox escape is possible by shadowing hasOwnProperty on a sandbox object, which disables prototype whitelist enforcement in the property-access path. This permits direct access to __proto__ and other blocked prototype properties, enabling host Object.prototype pollution and persistent cross-sandbox impact. This vulnerability is fixed in 0.8.29.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 02/07/2026
The vulnerability identified as CVE-2026-25586 affects SandboxJS, a JavaScript sandboxing library designed to isolate code execution and prevent unauthorized access to system resources. This security flaw represents a critical sandbox escape vulnerability that undermines the fundamental security model of the library. The issue exists in versions prior to 0.8.29 and allows attackers to bypass the intended isolation mechanisms through a sophisticated manipulation of JavaScript object properties. The vulnerability specifically targets the prototype chain enforcement mechanisms that are crucial for maintaining sandbox integrity.
The technical flaw exploits a weakness in how SandboxJS handles property access validation by leveraging the shadowing of the hasOwnProperty method on sandboxed objects. When an attacker successfully shadows this method, it effectively disables the prototype whitelist enforcement that normally governs access to prototype properties during the property-access path. This manipulation creates a pathway through which malicious code can directly access _proto_ and other blocked prototype properties that should remain restricted within the sandbox environment. The vulnerability operates at the core of JavaScript's object model and demonstrates how seemingly innocuous property access controls can be subverted to achieve complete sandbox escape.
The operational impact of this vulnerability extends beyond simple privilege escalation to include persistent cross-sandbox effects that can compromise the entire system. Once an attacker gains access to _proto_ and other prototype properties, they can pollute the host Object.prototype, which affects all objects in the JavaScript environment and creates a persistent backdoor. This pollution allows for continued access to restricted functionality even after the initial sandbox escape attempt, making the vulnerability particularly dangerous as it can maintain long-term access to system resources. The cross-sandbox impact means that a compromise in one sandboxed context can affect other sandboxes and potentially the host system itself, creating a cascading security failure.
The mitigation for this vulnerability requires immediate upgrade to version 0.8.29 or later, which implements proper prototype whitelist enforcement that cannot be bypassed through hasOwnProperty shadowing. Security practitioners should also conduct thorough code reviews to identify any applications still using vulnerable versions of SandboxJS and implement additional monitoring for suspicious property access patterns. Organizations should consider implementing runtime protections that detect and prevent prototype pollution attempts, as this vulnerability demonstrates how JavaScript's flexible object model can be exploited to undermine security controls. The fix addresses the root cause by strengthening the prototype validation mechanisms and ensuring that property access controls remain effective regardless of attempts to shadow core object methods, aligning with security best practices for sandbox implementation and protecting against similar attack vectors described in CWE-124 and ATT&CK techniques related to privilege escalation and code injection.