CVE-2026-25641: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in nyariv SandboxJS
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, there is a sandbox escape vulnerability due to a mismatch between the key on which the validation is performed and the key used for accessing properties. Even though the key used in property accesses is annotated as string, this is never enforced. So, attackers can pass malicious objects that coerce to different string values when used, e.g., one for the time the key is sanitized using hasOwnProperty(key) and a different one for when the key is used for the actual property access. This vulnerability is fixed in 0.8.29.
AI Analysis
Technical Summary
CVE-2026-25641 is a critical vulnerability in the SandboxJS library, a JavaScript sandboxing tool designed to isolate and safely execute untrusted code. The vulnerability is a Time-of-check to time-of-use (TOCTOU) race condition categorized under CWE-367. It occurs because the key used during the validation phase (using hasOwnProperty(key)) differs from the key used during actual property access due to the lack of strict enforcement of the key's string type. Attackers can exploit this by passing specially crafted malicious objects that coerce to different string values at validation and access times, effectively bypassing the sandbox's security checks. This sandbox escape allows malicious code to break out of the restricted environment, potentially executing arbitrary code or accessing sensitive data outside the sandbox. The flaw affects all versions of SandboxJS prior to 0.8.29, where the issue has been fixed. The vulnerability has a CVSS 3.1 base score of 10.0, reflecting its critical nature with network attack vector, no required privileges or user interaction, and complete impact on confidentiality, integrity, and availability. Although no public exploits are currently known, the severity and nature of the vulnerability make it a high priority for patching.
Potential Impact
For European organizations, the impact of this vulnerability can be severe, especially for those relying on SandboxJS to securely execute untrusted JavaScript code in web applications, cloud services, or development tools. A successful exploit could lead to sandbox escape, allowing attackers to execute arbitrary code on the host system, access sensitive data, or disrupt service availability. This could result in data breaches, intellectual property theft, service downtime, and reputational damage. Organizations in sectors such as finance, healthcare, government, and critical infrastructure, which often use sandboxing for security isolation, are particularly at risk. The critical severity and ease of exploitation without authentication mean that attackers can remotely compromise vulnerable systems, increasing the threat landscape. Additionally, the vulnerability could be leveraged as a stepping stone for more complex attacks within European networks, amplifying its impact.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of SandboxJS to version 0.8.29 or later, where the vulnerability is patched. Organizations should conduct an inventory of their software dependencies to identify any use of vulnerable SandboxJS versions. In addition to patching, developers should review sandbox implementation configurations to ensure strict type enforcement on keys and validate inputs rigorously. Employ runtime monitoring and anomaly detection to identify suspicious behavior indicative of sandbox escape attempts. Where possible, implement defense-in-depth by isolating sandboxed environments at the OS or container level to limit potential damage from escapes. Regularly update and audit third-party libraries and dependencies to prevent similar vulnerabilities. Finally, educate development teams about TOCTOU race conditions and secure coding practices to reduce the risk of introducing such flaws.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy
CVE-2026-25641: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in nyariv SandboxJS
Description
SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, there is a sandbox escape vulnerability due to a mismatch between the key on which the validation is performed and the key used for accessing properties. Even though the key used in property accesses is annotated as string, this is never enforced. So, attackers can pass malicious objects that coerce to different string values when used, e.g., one for the time the key is sanitized using hasOwnProperty(key) and a different one for when the key is used for the actual property access. This vulnerability is fixed in 0.8.29.
AI-Powered Analysis
Technical Analysis
CVE-2026-25641 is a critical vulnerability in the SandboxJS library, a JavaScript sandboxing tool designed to isolate and safely execute untrusted code. The vulnerability is a Time-of-check to time-of-use (TOCTOU) race condition categorized under CWE-367. It occurs because the key used during the validation phase (using hasOwnProperty(key)) differs from the key used during actual property access due to the lack of strict enforcement of the key's string type. Attackers can exploit this by passing specially crafted malicious objects that coerce to different string values at validation and access times, effectively bypassing the sandbox's security checks. This sandbox escape allows malicious code to break out of the restricted environment, potentially executing arbitrary code or accessing sensitive data outside the sandbox. The flaw affects all versions of SandboxJS prior to 0.8.29, where the issue has been fixed. The vulnerability has a CVSS 3.1 base score of 10.0, reflecting its critical nature with network attack vector, no required privileges or user interaction, and complete impact on confidentiality, integrity, and availability. Although no public exploits are currently known, the severity and nature of the vulnerability make it a high priority for patching.
Potential Impact
For European organizations, the impact of this vulnerability can be severe, especially for those relying on SandboxJS to securely execute untrusted JavaScript code in web applications, cloud services, or development tools. A successful exploit could lead to sandbox escape, allowing attackers to execute arbitrary code on the host system, access sensitive data, or disrupt service availability. This could result in data breaches, intellectual property theft, service downtime, and reputational damage. Organizations in sectors such as finance, healthcare, government, and critical infrastructure, which often use sandboxing for security isolation, are particularly at risk. The critical severity and ease of exploitation without authentication mean that attackers can remotely compromise vulnerable systems, increasing the threat landscape. Additionally, the vulnerability could be leveraged as a stepping stone for more complex attacks within European networks, amplifying its impact.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of SandboxJS to version 0.8.29 or later, where the vulnerability is patched. Organizations should conduct an inventory of their software dependencies to identify any use of vulnerable SandboxJS versions. In addition to patching, developers should review sandbox implementation configurations to ensure strict type enforcement on keys and validate inputs rigorously. Employ runtime monitoring and anomaly detection to identify suspicious behavior indicative of sandbox escape attempts. Where possible, implement defense-in-depth by isolating sandboxed environments at the OS or container level to limit potential damage from escapes. Regularly update and audit third-party libraries and dependencies to prevent similar vulnerabilities. Finally, educate development teams about TOCTOU race conditions and secure coding practices to reduce the risk of introducing such flaws.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-04T05:15:41.791Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 69864849f9fa50a62f2e035f
Added to database: 2/6/2026, 8:00:09 PM
Last enriched: 2/6/2026, 8:14:41 PM
Last updated: 2/6/2026, 9:08:47 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-25631: CWE-20: Improper Input Validation in n8n-io n8n
MediumCVE-2026-25592: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in microsoft semantic-kernel
CriticalCVE-2026-2066: Buffer Overflow in UTT 进取 520W
HighCVE-2026-25729: CWE-863: Incorrect Authorization in lintsinghua DeepAudit
LowCVE-2026-25634: CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer in InternationalColorConsortium iccDEV
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.