CVE-2023-26122: Vulnerability in safe-eval package allows Sandbox Bypass

safe-eval Updated 02 Oct 2025

Summary

11/04/2023
No i
Critical
10.0

CVE-2023-26122: safe-eval vulnerable to Sandbox Bypass due to improper input sanitization. Affects safe-eval versions < 0.4.2. No fix is published. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The safe-eval package is an npm package that provides a sandboxed JavaScript environment for evaluating code. It is commonly used in applications that require dynamic code execution while maintaining a secure environment. However, all versions of the safe-eval package are vulnerable to a Sandbox Bypass due to improper input sanitization. This vulnerability is derived from prototype pollution exploitation, which can lead to remote code execution (RCE). The affected functions include defineGetter, stack(), toLocaleString(), propertyIsEnumerable.call(), and valueOf().

Vulnerability Detail

The vulnerability in the safe-eval package arises from the lack of proper input sanitization, allowing an attacker to exploit prototype pollution. By manipulating the input, an attacker can bypass the sandbox and execute arbitrary code remotely. This can have severe consequences, including unauthorized access, data breaches, and potential system compromise. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 10.0.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, developers can consider using alternative packages or libraries that provide similar functionality but have been audited for security vulnerabilities. It is crucial to thoroughly evaluate the security posture of any alternative solution before implementation.

Conclusion

The safe-eval package is vulnerable to a Sandbox Bypass due to improper input sanitization, which can result in remote code execution. It is crucial for developers to update to the latest version of the package that includes a fix for this vulnerability. Additionally, considering alternative packages or libraries that have been audited for security vulnerabilities can provide an extra layer of protection. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for safe-eval →

Share this vulnerability

FAQ

The safe-eval package is an npm package that provides a sandboxed JavaScript environment for evaluating code securely.

Prototype pollution is a vulnerability that allows an attacker to modify the prototype of an object, leading to unexpected behavior and potential security issues.

Exploiting this vulnerability can result in remote code execution (RCE), allowing an attacker to execute arbitrary code on the affected system. This can lead to unauthorized access, data breaches, and potential system compromise.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.

This vulnerability is rated as CRITICAL with a CVSS score of 10.0, indicating its high severity and potential impact on affected systems.

Related vulnerabilities

Recent vulnerabilities recorded for safe-eval.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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