CVE-2026-25641: @nyariv/sandboxjs Critical Sandbox Escape Vulnerability

@nyariv/sandboxjs Updated 06 Feb 2026

Summary

05/02/2026
Yes i
Critical
10.0

CVE-2026-25641: @nyariv/sandboxjs vulnerable to sandbox escape via TOCTOU bug on keys in property accesses. Affects @nyariv/sandboxjs versions < 0.8.29. Fixed in 0.8.29. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @nyariv/sandboxjs package is a JavaScript library that allows developers to execute code in a controlled environment, or sandbox, to prevent malicious actions. It is designed to provide a secure way to run untrusted code while limiting access to sensitive resources. However, a critical vulnerability has been identified that allows attackers to escape the sandbox, potentially leading to remote code execution.

Vulnerability Detail

The vulnerability arises from a Time-of-Check to Time-of-Use (TOCTOU) bug in property accesses. The key used for validation does not match the key used for accessing properties, allowing attackers to exploit this inconsistency. By passing malicious objects that can coerce to different string values, an attacker can manipulate the behavior of the sandbox, leading to unauthorized access and execution of arbitrary code. This poses a significant risk, as it can lead to remote code execution if an attacker can run code inside the sandbox.

How To Fix

Minimum fixed version

0.8.29

This is the first release that contains the fix.

npm install @nyariv/sandboxjs@0.8.29

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the sandbox environment for executing untrusted code until you can update to the patched version. Additionally, ensure that any objects passed to the sandbox are sanitized and do not have properties that can be coerced into different values.

Conclusion

The @nyariv/sandboxjs package has a critical vulnerability that allows for sandbox escape due to a TOCTOU bug. It is essential to update to the patched version 0.8.29 to secure your application against potential remote code execution attacks. Utilize tools like Vulert to monitor for vulnerabilities in your projects.

See every vulnerability recorded for @nyariv/sandboxjs →

Share this vulnerability

FAQ

The vulnerability has a CVSS score of 10.0, indicating it is critical and poses a significant risk to applications using the affected package.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.

If exploited, this vulnerability can lead to remote code execution, allowing attackers to run arbitrary code within the sandbox environment, which can compromise the entire application.

Yes, a patch is available in version 0.8.29 of the @nyariv/sandboxjs package. It is recommended to update to this version to mitigate the risk.

If you cannot update the package right away, consider implementing a workaround by avoiding the use of the sandbox for untrusted code execution and ensuring that any objects passed to it are properly sanitized.

Related vulnerabilities

Recent vulnerabilities recorded for @nyariv/sandboxjs.

How To Fix

Minimum fixed version

0.8.29

This is the first release that contains the fix.

npm install @nyariv/sandboxjs@0.8.29

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback