CVE-2026-25641: Sandbox Escape TOCTOU in SandboxJS
- Vendor
- Nyariv
CVE-2026-25641 is a sandbox escape vulnerability in SandboxJS affecting versions 0.8.28 and earlier. The flaw arises from a mismatch between the property key validated by the sandbox and the key ultimately used for property access. SandboxJS performs a safety check using a key value during validation, but does not enforce that the same primitive string value is later used when the property is accessed. Because the key is only annotated as a string and not strictly enforced as one, an attacker can supply a crafted object whose coercion yields different string values at different moments. This creates a time-of-check to time-of-use condition in which a key can appear benign during validation and resolve to a dangerous property during access, enabling bypass of sandbox restrictions and access to prohibited prototype-related properties.
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 can break the isolation guarantees of SandboxJS and permit sandbox escape. By bypassing property access restrictions, an attacker may reach dangerous prototype paths and other sensitive language features that are intended to be blocked by the sandbox. In practical terms, this can enable arbitrary code execution in the host context, security policy bypass, and potentially full compromise of the environment executing untrusted JavaScript.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, do not execute untrusted code in affected SandboxJS deployments. As a temporary hardening measure, reject non-primitive property keys in sandboxed operations, explicitly deny access to prototype-related properties such as constructor, prototype, and proto, and reduce or remove access paths that could expose powerful built-ins such as Function or host runtime capabilities. These measures are compensating controls only and should not be treated as a substitute for upgrading.
Remediation
Patch, then assume compromise.
Upgrade SandboxJS to version 0.8.29 or later, which contains the fix for this vulnerability. The underlying issue should be addressed by ensuring that property keys used in security-sensitive validation and subsequent access are canonicalized once and enforced as primitive strings, so the checked value and the used value cannot diverge through coercion side effects.
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-25641 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-25641?
- Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2026-25641.
- Is there a patch for CVE-2026-25641?
- Upgrade SandboxJS to version 0.8.29 or later, which contains the fix for this vulnerability. The underlying issue should be addressed by ensuring that property keys used in security-sensitive validation and subsequent access are canonicalized once and enforced as primitive strings, so the checked value and the used value cannot diverge through coercion side effects.
- What products are affected by CVE-2026-25641?
- Nyariv Sandboxjs.
- How severe is CVE-2026-25641?
- CVE-2026-25641 has a CVSS v3.1 score of 9.0 (Critical) and an EPSS score of 0.52% (45th 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.