# CVE-2026-25142: SandboxJS prototype pollution vulnerability leading to sandbox escape and RCE

Source: https://junglewise.ai/threats/cve-2026-25142-sandboxjs-prototype-pollution-vulnerability-leading-to-sandbox  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-02. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-25142 · Severity: low · CVSS 3.1 · Published 2026-02-02

SandboxJS is a JavaScript sandbox library designed to safely execute untrusted code in isolation. A critical vulnerability in prototype access controls allows attackers to bypass sandbox restrictions and execute arbitrary code on the system, leading to complete system compromise through remote code execution.

Technologies: [@nyariv/sandboxjs (npm)](https://junglewise.ai/threats/technologies/nyariv-sandboxjs), [Nyariv Sandboxjs](https://junglewise.ai/threats/technologies/sandboxjs). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Nyariv](https://junglewise.ai/threats/vendors/nyariv).

## Quick answers

**Is CVE-2026-25142 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-25142 being exploited in the wild.

**How severe is CVE-2026-25142?** Low severity, with a CVSS score of 3.1, published 2 February 2026.

**Which products and versions are affected?** @nyariv/sandboxjs (npm) SEMVER:introduced=0,fixed=0.8.27; Nyariv Sandboxjs <= 0.8.26.

**Is there a fix for CVE-2026-25142?** Yes. @nyariv/sandboxjs (npm): upgrade to 0.8.27 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-25142 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-25142?** Check whether you run @nyariv/sandboxjs (npm) or Nyariv Sandboxjs at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @nyariv/sandboxjs (npm): upgrade to 0.8.27 or later

  ```sh
  npm install @nyariv/sandboxjs@0.8.27
  ```


## Technical details

SandboxJS fails to properly restrict access to the __lookupGetter__ method, which can be used to obtain Object prototypes and bypass sandbox isolation. The vulnerability exists in the function property access code path (executor.ts lines 368-398), where a special case for functions bypasses prototype chain whitelist checks that normally protect the root Object prototype. An unauthenticated attacker can inject a payload that uses __lookupGetter__ to access the forbidden __proto__ property, allowing them to escape the sandbox and execute arbitrary Node.js code via child_process.execSync(). The fix is available in version 0.8.27; all versions prior to 0.8.26 are affected.

## Affected products

- nyariv SandboxJS <= 0.8.26

## Identifiers

- CVE-2026-25142
- GHSA-9p4w-fq8m-2hp7

## Timeline

- 2026-02-02: disclosed: GHSA-9p4w-fq8m-2hp7 and CVE-2026-25142 published
- 2026-02-02: patched: Fix released in version 0.8.27

## References

- [https://github.com/nyariv/SandboxJS/security/advisories/GHSA-9p4w-fq8m-2hp7](https://github.com/nyariv/SandboxJS/security/advisories/GHSA-9p4w-fq8m-2hp7)

## Related threats

- [nyariv SandboxJS sandbox escape via Function.caller leakage](https://junglewise.ai/threats/cve-2026-43898-nyariv-sandboxjs-sandbox-escape-via-function-caller-leakage)
- [SandboxJS sandbox escape via Prop object leak in new handler](https://junglewise.ai/threats/cve-2026-34217-sandboxjs-sandbox-escape-via-prop-object-leak-in-new-handler)
- [SandboxJS stack overflow via deeply nested expressions](https://junglewise.ai/threats/cve-2026-34211-sandboxjs-stack-overflow-via-deeply-nested-expressions)
- [SandboxJS sandbox integrity escape via constructor manipulation](https://junglewise.ai/threats/cve-2026-34208-nyariv-sandboxjs-sandbox-integrity-escape-via-constructor-bypass)
- [SandboxJS execution-quota bypass in timers](https://junglewise.ai/threats/cve-2026-32723-sandboxjs-execution-quota-bypass-in-timers)
