Critical SandboxJS Sandbox Escape Enables Host Remote Code Execution
Vulnerability Disclosure · 2 sources · Updated 5mo ago · First seen May 13, 2026

A critical vulnerability in the npm package @nyariv/sandboxjs allows attackers to escape the JavaScript sandbox and execute arbitrary code on the host system. The issue, tracked as CVE-2026-43898, affects all versions through 0.9.5 and has been rated CVSS 10.0. Public reporting and GitHub advisory coverage describe the flaw as a sandbox escape that can be triggered without credentials or user interaction, creating a path to full host takeover when applications use the library to process untrusted JavaScript.
The bug stems from improper exposure of internal callback functionality during function property access, including caller, callee, and arguments, enabling attackers to recover the host Function constructor and run arbitrary JavaScript or system commands. Separate advisory reporting also describes a sandbox escape caused by a TOCTOU bug in key handling during property access, underscoring broader weaknesses in the package's isolation model. Maintainers released 0.9.6 to block access to the dangerous properties, and organizations using SandboxJS are being urged to upgrade immediately or stop executing untrusted code with the library.


