# CVE-2025-34146: nyariv SandboxJS prototype pollution and sandbox escape

Source: https://junglewise.ai/threats/cve-2025-34146-nyariv-sandboxjs-prototype-pollution-and-sandbox-escape  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-07-31. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-34146 · Severity: medium · CVSS 4 · Published 2025-07-31

@nyariv/SandboxJS is a JavaScript sandbox library used to safely execute untrusted code. A prototype pollution vulnerability in versions 0.8.23 and earlier allows attackers to inject arbitrary properties into JavaScript's Object.prototype via crafted code, potentially breaking the sandbox's isolation and enabling denial-of-service attacks or code execution outside the intended restrictions.

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-2025-34146 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-34146 being exploited in the wild.

**How severe is CVE-2025-34146?** Medium severity, with a CVSS score of 4, published 31 July 2025.

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

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

**How is CVE-2025-34146 attacked?** It is attacked with local access.

**Am I affected by CVE-2025-34146?** 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.24 or later

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


## Technical details

A prototype pollution vulnerability (CWE-1321) exists in @nyariv/SandboxJS versions ≤0.8.23, stemming from insufficient prototype access checks in the sandbox executor logic. Attackers can exploit this by crafting JavaScript code that chains prototype access (e.g., via String methods) to reach Object.prototype and inject arbitrary properties using __defineGetter__. The attack is local, requires no authentication or user interaction, and can be triggered by any code compiled and executed within the sandbox. Successful exploitation can result in denial-of-service conditions or, under certain conditions, escape the sandboxed environment entirely. The vulnerability was patched in version 0.8.24.

## Affected products

- nyariv SandboxJS ≤0.8.23

## Identifiers

- CVE-2025-34146
- GHSA-9qm3-6qrr-c76m

## Timeline

- 2025-04-12: disclosed: Issue opened on GitHub
- 2025-07-31: advisory: GHSA-9qm3-6qrr-c76m published
- 2025-07-31: patched: Fix released in version 0.8.24

## References

- [https://github.com/nyariv/SandboxJS/issues/31](https://github.com/nyariv/SandboxJS/issues/31)

## 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)
