CVE-2026-23830
SandboxJS has Sandbox Escape via Unprotected AsyncFunction Constructor
Also known as GHSA-wxhw-j4hc-fmq6
Mitigation
- Upgrade @nyariv/sandboxjs to 0.8.26 or later.
Who should check
- Projects that depend on npm package @nyariv/sandboxjs (< 0.8.26)
- Anyone running nyariv SandboxJS < 0.8.26
Vulnerability facts
- Affected
- @nyariv/sandboxjs < 0.8.26
- Fixed in
- 0.8.26
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 10.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 1.35% chance of exploitation in 30 days (percentile 72, 2026-11-26)
- CWE
- CWE-94, CWE-693, CWE-913
- Modified
Description
SandboxJS is a JavaScript sandboxing library. Versions prior to 0.8.26 have a sandbox escape vulnerability due to `AsyncFunction` not being isolated in `SandboxFunction`. The library attempts to sandbox code execution by replacing the global `Function` constructor with a safe, sandboxed version (`SandboxFunction`). This is handled in `utils.ts` by mapping `Function` to `sandboxFunction` within a map used for lookups. However, before version 0.8.26, the library did not include mappings for `AsyncFunction`, `GeneratorFunction`, and `AsyncGeneratorFunction`. These constructors are not global properties but can be accessed via the `.constructor` property of an instance (e.g., `(async () => {}).constructor`). In `executor.ts`, property access is handled. When code running inside the sandbox accesses `.constructor` on an async function (which the sandbox allows creating), the `executor` retrieves the property value. Since `AsyncFunction` was not in the safe-replacement map, the `executor` returns the actual native host `AsyncFunction` constructor. Constructors for functions in JavaScript (like `Function`, `AsyncFunction`) create functions that execute in the global scope. By obtaining the host `AsyncFunction` constructor, an attacker can create a new async function that executes entirely outside the sandbox context, bypassing all restrictions and gaining full access to the host environment (Remote Code Execution). Version 0.8.26 patches this vulnerability.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm @nyariv/sandboxjs | < 0.8.26 | 0.8.26 | osv |
| nyariv SandboxJS | < 0.8.26 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-23830. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-23830.md Affected: @nyariv/sandboxjs < 0.8.26 Fixed in: 0.8.26 Steps: 1. Search this machine and project for @nyariv/sandboxjs (npm), nyariv SandboxJS: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-23830 being exploited?
There is no confirmed exploitation: CVE-2026-23830 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.35% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-23830?
Critical: CVSS 10.0 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-23830?
@nyariv/sandboxjs < 0.8.26.
Is there a fix for CVE-2026-23830?
Yes. Fixed in 0.8.26. Upgrade @nyariv/sandboxjs to 0.8.26 or later.
How do I check if I'm affected by CVE-2026-23830?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.