CVE-2026-23830: CWE-94: Improper Control of Generation of Code ('Code Injection') in nyariv SandboxJS
CVE-2026-23830 is a critical sandbox escape vulnerability in versions of the SandboxJS library prior to 0. 8. 26. The flaw arises because the sandbox does not properly isolate the AsyncFunction constructor, allowing malicious code to access the native AsyncFunction via the . constructor property. This enables attackers to create asynchronous functions that execute outside the sandbox, leading to remote code execution with full host privileges. The vulnerability has a CVSS score of 10, indicating maximum severity with no authentication or user interaction required. The issue is patched in version 0. 8. 26.
AI Analysis
Technical Summary
SandboxJS is a JavaScript sandboxing library designed to safely execute untrusted code by replacing the global Function constructor with a sandboxed version called SandboxFunction. However, in versions prior to 0.8.26, the library failed to similarly replace or isolate other function constructors such as AsyncFunction, GeneratorFunction, and AsyncGeneratorFunction. These constructors are not globally accessible but can be obtained via the .constructor property of function instances, for example, by evaluating (async () => {}).constructor. When sandboxed code accesses the .constructor property on an async function, the executor returns the native host AsyncFunction constructor because it was not mapped to a sandboxed equivalent. This native constructor allows creation of new asynchronous functions that execute in the global scope outside the sandbox's control. Consequently, an attacker can craft code that escapes the sandbox environment, bypassing all restrictions and gaining remote code execution (RCE) capabilities on the host system. This vulnerability is classified under CWE-94 (Improper Control of Generation of Code), CWE-693 (Protection Mechanism Failure), and CWE-913 (Improper Control of Dynamically-Managed Code Resources). The issue was publicly disclosed and assigned CVE-2026-23830 with a maximum CVSS 3.1 score of 10.0, reflecting its criticality. The vulnerability requires no privileges or user interaction to exploit and affects all versions of SandboxJS before 0.8.26. The patch in version 0.8.26 addresses this by including AsyncFunction and related constructors in the sandboxed function map, preventing escape via .constructor property access.
Potential Impact
For European organizations, this vulnerability poses a severe risk, especially those relying on SandboxJS to safely execute third-party or user-generated JavaScript code in web applications, serverless functions, or development tools. Exploitation leads to full remote code execution on the host environment, potentially allowing attackers to steal sensitive data, disrupt services, deploy malware, or pivot within internal networks. The critical nature of the vulnerability means that any exposed service using vulnerable SandboxJS versions is at immediate risk of compromise. Given the widespread use of JavaScript sandboxing in cloud services, SaaS platforms, and development environments, the impact could be broad, affecting confidentiality, integrity, and availability of systems. Organizations in sectors with high regulatory requirements such as finance, healthcare, and critical infrastructure in Europe face heightened consequences including data breaches and compliance violations. The lack of known exploits in the wild does not diminish the urgency due to the ease of exploitation and the critical severity score.
Mitigation Recommendations
European organizations should immediately audit their software supply chain and internal applications to identify any usage of SandboxJS versions prior to 0.8.26. The primary mitigation is to upgrade all instances of SandboxJS to version 0.8.26 or later, which patches the vulnerability by properly sandboxing AsyncFunction and related constructors. If upgrading is not immediately feasible, organizations should implement strict input validation and sandbox usage restrictions to limit exposure to untrusted code execution. Employ runtime monitoring and anomaly detection to identify suspicious behavior indicative of sandbox escape attempts. Additionally, isolate environments running sandboxed code with strict network segmentation and least privilege principles to contain potential breaches. Security teams should also review dependency management practices to ensure timely patching of third-party libraries. Finally, consider applying Web Application Firewalls (WAFs) and endpoint detection and response (EDR) solutions to detect and block exploitation attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland, Belgium, Ireland
CVE-2026-23830: CWE-94: Improper Control of Generation of Code ('Code Injection') in nyariv SandboxJS
Description
CVE-2026-23830 is a critical sandbox escape vulnerability in versions of the SandboxJS library prior to 0. 8. 26. The flaw arises because the sandbox does not properly isolate the AsyncFunction constructor, allowing malicious code to access the native AsyncFunction via the . constructor property. This enables attackers to create asynchronous functions that execute outside the sandbox, leading to remote code execution with full host privileges. The vulnerability has a CVSS score of 10, indicating maximum severity with no authentication or user interaction required. The issue is patched in version 0. 8. 26.
AI-Powered Analysis
Technical Analysis
SandboxJS is a JavaScript sandboxing library designed to safely execute untrusted code by replacing the global Function constructor with a sandboxed version called SandboxFunction. However, in versions prior to 0.8.26, the library failed to similarly replace or isolate other function constructors such as AsyncFunction, GeneratorFunction, and AsyncGeneratorFunction. These constructors are not globally accessible but can be obtained via the .constructor property of function instances, for example, by evaluating (async () => {}).constructor. When sandboxed code accesses the .constructor property on an async function, the executor returns the native host AsyncFunction constructor because it was not mapped to a sandboxed equivalent. This native constructor allows creation of new asynchronous functions that execute in the global scope outside the sandbox's control. Consequently, an attacker can craft code that escapes the sandbox environment, bypassing all restrictions and gaining remote code execution (RCE) capabilities on the host system. This vulnerability is classified under CWE-94 (Improper Control of Generation of Code), CWE-693 (Protection Mechanism Failure), and CWE-913 (Improper Control of Dynamically-Managed Code Resources). The issue was publicly disclosed and assigned CVE-2026-23830 with a maximum CVSS 3.1 score of 10.0, reflecting its criticality. The vulnerability requires no privileges or user interaction to exploit and affects all versions of SandboxJS before 0.8.26. The patch in version 0.8.26 addresses this by including AsyncFunction and related constructors in the sandboxed function map, preventing escape via .constructor property access.
Potential Impact
For European organizations, this vulnerability poses a severe risk, especially those relying on SandboxJS to safely execute third-party or user-generated JavaScript code in web applications, serverless functions, or development tools. Exploitation leads to full remote code execution on the host environment, potentially allowing attackers to steal sensitive data, disrupt services, deploy malware, or pivot within internal networks. The critical nature of the vulnerability means that any exposed service using vulnerable SandboxJS versions is at immediate risk of compromise. Given the widespread use of JavaScript sandboxing in cloud services, SaaS platforms, and development environments, the impact could be broad, affecting confidentiality, integrity, and availability of systems. Organizations in sectors with high regulatory requirements such as finance, healthcare, and critical infrastructure in Europe face heightened consequences including data breaches and compliance violations. The lack of known exploits in the wild does not diminish the urgency due to the ease of exploitation and the critical severity score.
Mitigation Recommendations
European organizations should immediately audit their software supply chain and internal applications to identify any usage of SandboxJS versions prior to 0.8.26. The primary mitigation is to upgrade all instances of SandboxJS to version 0.8.26 or later, which patches the vulnerability by properly sandboxing AsyncFunction and related constructors. If upgrading is not immediately feasible, organizations should implement strict input validation and sandbox usage restrictions to limit exposure to untrusted code execution. Employ runtime monitoring and anomaly detection to identify suspicious behavior indicative of sandbox escape attempts. Additionally, isolate environments running sandboxed code with strict network segmentation and least privilege principles to contain potential breaches. Security teams should also review dependency management practices to ensure timely patching of third-party libraries. Finally, consider applying Web Application Firewalls (WAFs) and endpoint detection and response (EDR) solutions to detect and block exploitation attempts.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-01-16T15:46:40.841Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 697a295b4623b1157cd2335e
Added to database: 1/28/2026, 3:20:59 PM
Last enriched: 1/28/2026, 3:35:18 PM
Last updated: 1/28/2026, 6:03:38 PM
Views: 8
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-2025-57794: CWE-434 Unrestricted Upload of File with Dangerous Type in Explorance Blue
UnknownCVE-2025-57792: CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in Explorance Blue
UnknownCVE-2025-46316: Processing a maliciously crafted Pages document may result in unexpected termination or disclosure of process memory in Apple macOS
UnknownCVE-2025-46306: Processing a maliciously crafted Keynote file may disclose memory contents in Apple iOS and iPadOS
UnknownCVE-2025-70999: n/a
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.