CVE-2026-23830: SandboxJS: sandbox escape via AsyncFunction constructor (CWE-94)
SandboxJS versions before 0.8.26 contain a sandbox escape in which the host AsyncFunction constructor is reachable from inside the sandbox through the constructor property of an async function. The GitHub advisory describes this as allowing code to run outside the sandbox with potential full host access, and the GitHub CNA rates it critical with a CVSS 3.1 score of 10. Version 0.8.26 contains the fix, and no confirmed exploitation appears in the sources consulted.
Overview
SandboxJS is a JavaScript sandboxing library. CVE-2026-23830 affects versions before 0.8.26, where the library's safe-replacement mapping did not cover AsyncFunction, GeneratorFunction and AsyncGeneratorFunction. According to the GitHub Security Advisory, code inside the sandbox could obtain the host AsyncFunction constructor through the constructor property of an async function, which the advisory describes as a sandbox escape.
Impact
- The advisory describes an escape from the sandbox to the host environment, with potential full access to the host (remote code execution).
- The CVSS 3.1 vector reported is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H, with score 10 and critical severity from the GitHub CNA.
- The weakness is classified as CWE-94, Code Injection.
Affected products and versions
- Product: Nyariv Sandboxjs (SandboxJS).
- Affected range: versions before 0.8.26.
- Fixed in: 0.8.26, per the advisory and the referenced patch commit.
Exploitation status
This CVE is not listed in the CISA KEV catalog in the record, so no active exploitation is reported. No confirmed exploitation in the wild appears in the sources consulted. The GitHub reference is tagged as exploit-related, but the record gives no further detail on exploitation.
Remediation and mitigation
- Upgrade SandboxJS to version 0.8.26 or later. The patch commit is referenced in the record.
- Inventory applications and dependencies that embed SandboxJS, including transitive dependencies.
- Until the upgrade is applied, consider the sandbox unreliable as a security boundary for untrusted code.
Detection guidance
- Identify installed SandboxJS versions in software bills of materials and lock files.
- Review workflows where untrusted scripts are evaluated and confirm the running version is 0.8.26 or later.
- Monitor for unexpected host-side activity from processes that evaluate user-supplied code.
Limitations of the available information
The record does not include an EPSS score, SSVC data, or an NVD-assigned CVSS score. Workarounds other than upgrading are not described. The sources do not establish whether this issue has been exploited. The number and nature of affected deployments are unknown.
Frequently asked questions
Which SandboxJS versions are affected by CVE-2026-23830?
The record lists the affected range as versions before 0.8.26. Upgrading to 0.8.26 or later addresses the issue according to the advisory and the referenced patch commit.
What is the root cause?
The sandbox replaces the global Function constructor with a safe version, but the mapping omitted AsyncFunction, GeneratorFunction and AsyncGeneratorFunction. Those constructors can be reached through the constructor property of a function instance, so the host version could be returned to sandboxed code.
Is this vulnerability known to be exploited?
The record shows no KEV listing, and no confirmed exploitation appears in the sources consulted. The GitHub reference is tagged as exploit-related, but no further exploitation details are provided.
This analysis was drafted with AI assistance from verified source data and automatically checked against it.