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

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), Nyariv Sandboxjs. Vendors: npm, 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.