# CVE-2026-34208: SandboxJS sandbox integrity escape via constructor manipulation

Source: https://junglewise.ai/threats/cve-2026-34208-nyariv-sandboxjs-sandbox-integrity-escape-via-constructor-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-06. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-34208 · Severity: critical · CVSS 10 · Published 2026-04-06

SandboxJS is a Node.js library that safely executes untrusted code in an isolated sandbox environment. The vulnerability allows malicious code to bypass sandbox protections and modify shared global objects (like Math or JSON) that persist across all sandbox instances in the same process. This could allow attackers to corrupt application behavior, steal data, or achieve code execution if the host application relies on the integrity of built-in functions.

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

**How severe is CVE-2026-34208?** Critical severity, with a CVSS score of 10, published 6 April 2026.

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

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

**How is CVE-2026-34208 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-34208?** 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.36 or later

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


## Technical details

SandboxJS attempts to prevent untrusted code from modifying global objects by checking the isGlobal flag during assignment operations. However, the vulnerability exploits a privilege gap: the SandboxGlobal constructor function, which performs property writes via an internal loop, is callable from sandbox code via Function.prototype.call and is not subject to the same global-mutation restrictions. An attacker can invoke this constructor via this.constructor.call(target, payloadObject) to write arbitrary properties into any host global object (e.g., Math.random or JSON.stringify). Because these mutations occur at runtime in the shared process context, they persist across all subsequent sandbox instances and are visible to host code, enabling cross-instance contamination. The attack requires no authentication or user interaction and can be chained with host gadgets (application code that uses the mutated globals) to achieve broader compromise including potential code execution. Patches are available in version 0.8.36 and later.

## Affected products

- nyariv @nyariv/sandboxjs 0.8.35 and earlier

## Identifiers

- CVE-2026-34208
- GHSA-2gg9-6p7w-6cpj

## Timeline

- 2026-04-03: disclosed: Advisory published
- 2026-04-03: patched: Patched in version 0.8.36
- 2026-04-06: other: NVD published CVE-2026-34208

## References

- [https://github.com/nyariv/SandboxJS/security/advisories/GHSA-2gg9-6p7w-6cpj](https://github.com/nyariv/SandboxJS/security/advisories/GHSA-2gg9-6p7w-6cpj)
- [https://github.com/nyariv/SandboxJS](https://github.com/nyariv/SandboxJS)

## 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 execution-quota bypass in timers](https://junglewise.ai/threats/cve-2026-32723-sandboxjs-execution-quota-bypass-in-timers)
- [SandboxJS sandbox escape allowing remote code execution](https://junglewise.ai/threats/cve-2026-26954-sandboxjs-sandbox-escape-allowing-remote-code-execution)
