# CVE-2026-25641: @nyariv/sandboxjs sandbox escape via TOCTOU in property access

Source: https://junglewise.ai/threats/cve-2026-25641-nyariv-sandboxjs-sandbox-escape-via-toctou-in-property-access  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-05. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-25641 · Severity: low · CVSS 3.1 · Published 2026-02-05

@nyariv/sandboxjs is a JavaScript sandbox environment that isolates untrusted code execution. A vulnerability in how the sandbox validates property access keys allows attackers to bypass security checks through object coercion, leading to remote code execution and complete compromise of the sandboxed environment.

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

## Quick answers

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

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

**Which products and versions are affected?** @nyariv/sandboxjs (npm) SEMVER:introduced=0,fixed=0.8.29.

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

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

**Am I affected by CVE-2026-25641?** Check whether you run @nyariv/sandboxjs (npm) 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.29 or later

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


## Technical details

The vulnerability is a time-of-check-to-time-of-use (TOCTOU) bug in the property access handler (executor.ts line 304). Although the key parameter is annotated as string, the code does not enforce string type coercion, allowing attackers to pass malicious objects with custom toString() methods. These objects can return different string values at different call times—e.g., "x" when checked with hasOwnProperty() but "__proto__" when used for actual property access. An attacker with code execution inside the sandbox can exploit this to access the __proto__ property and modify critical functions like isFinite.constructor, enabling arbitrary code execution. The vulnerability affects versions &lt;= 0.8.28 and is patched in 0.8.29.

## Affected products

- nyariv @nyariv/sandboxjs <= 0.8.28

## Identifiers

- CVE-2026-25641
- GHSA-7x3h-rm86-3342

## Timeline

- 2026-02-05: disclosed
- 2026-02-05: patched: Fixed in version 0.8.29

## References

- [https://github.com/nyariv/SandboxJS/security/advisories/GHSA-7x3h-rm86-3342](https://github.com/nyariv/SandboxJS/security/advisories/GHSA-7x3h-rm86-3342)

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