Sandboxjs
CVE-2026-23830
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted JavaScript code to SandboxJS
-
ExploitAccess AsyncFunction constructor
-
ExecutionEscape sandbox isolation
-
ImpactExecute arbitrary code outside sandbox
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | SandboxJS versions prior to 0.8.26 with sandboxed code execution enabled. AsyncFunction constructor must be accessible without mapping to SandboxFunction. No authentication or special configuration required — remote code execution against default SandboxJS implementations accepting untrusted code. |
| Impact | CVSS 10.0 with PoC and patch. SandboxJS is used by applications that need to run untrusted JavaScript safely. A sandbox escape defeats the entire purpose of the library. |
| Exploit ScenarioDerived | An attacker submits JavaScript code that uses the AsyncFunction constructor to break out of the SandboxJS sandbox, gaining access to the host Node.js environment and executing arbitrary code with the application's full privileges. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
SandboxJS library prior to 0.8.26 has a CVSS 10.0 sandbox escape via AsyncFunction constructor, allowing execution of arbitrary code outside the sandbox boundary.
Earlier versions of this analysis (1)
CVSS 10.0 sandbox escape in SandboxJS via AsyncFunction constructor bypasses all restrictions.
RemediationAI
Update to SandboxJS 0.8.26 or later. Consider using more robust sandboxing (V8 isolates, WebAssembly) for high-security use cases.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SandboxJS < 0.8.26 fails to properly restrict access to the AsyncFunction constructor (CWE-94), allowing sandboxed code to escape the sandbox entirely and execute arbitrary JavaScript in the host context.
Know when Sandboxjs gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
3DescriptionGitHub Advisory
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.
Executive ViewAI
A critical sandbox escape vulnerability in SandboxJS allows attackers to break out of the JavaScript sandbox and execute arbitrary code with full application privileges. Any organization using SandboxJS versions prior to 0.8.26 is at immediate risk of complete system compromise, particularly if the library processes untrusted code or user-supplied scripts.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)GitHub Advisory
Sandbox escape in SandboxJS before 0.8.27 via __lookupGetter__ prototype chain access. CVSS 10.0 — complete sandbox bypa
SandboxJS has a second CVSS 10.0 sandbox escape where function return values aren't properly sanitized, allowing code ex
SandboxJS has a fourth CVSS 10.0 sandbox escape through Map's safe prototype being used as a gateway to inject arbitrary
SandboxJS has a third CVSS 10.0 sandbox escape via Map prototype shadowing that allows complete sandbox bypass.
SandboxJS has a fifth CVSS 10.0 escape via a TOCTOU race condition in sandbox validation, allowing code to slip through
SandboxJS prior to 0.8.31 has yet another sandbox escape via prototype pollution, the sixth distinct escape technique di
SandboxJS sandbox escape before 0.8.34 via Function access through arrays. CVSS 10.0.
GHSA-wxhw-j4hc-fmq6
NVD
CVE.org
EPSS
Exploit-DB