SandboxJS Sandbox Escape via Unprotected AsyncFunction Constructor (CVE-2026-23830)
Vulnerability Disclosure · 2 sources · Updated 4mo ago · First seen Jan 29, 2026

CVE-2026-23830 is a maximum-severity (CVSS 10.0) sandbox-escape vulnerability in SandboxJS, a library intended to safely execute untrusted JavaScript. The issue allows attackers to break out of the sandbox and achieve arbitrary code execution on the host by leveraging gaps in SandboxJS’s “safe replacement” model for dangerous constructors.
The flaw stems from SandboxJS mapping the global Function constructor to a sandboxed equivalent, but (in affected versions) failing to similarly isolate the “Async” and generator constructor families: AsyncFunction, GeneratorFunction, and AsyncGeneratorFunction. Although these constructors are not directly exposed as globals, they can be obtained via an instance’s .constructor (e.g., (async () => {}).constructor); because the executor returns the native host AsyncFunction when it is not present in the safe-replacement map, an attacker can create new functions that execute in the global scope and bypass sandbox restrictions. SandboxJS 0.8.26 is reported as the patched version.


