CVE-2020-7710: Sandbox Breakout / Arbitrary Code Execution in safe-eval

safe-eval Updated 02 Oct 2025

Summary

25/08/2020
No i
Critical
9.8

CVE-2020-7710: Sandbox Breakout / Arbitrary Code Execution in safe-eval. Affects safe-eval versions < 0.4.1. 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 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 safe-eval package is an npm package that provides a sandboxed environment for evaluating JavaScript code. It is commonly used to execute user-provided code in a controlled manner. However, all versions of safe-eval are vulnerable to a Sandbox Escape vulnerability, which can lead to Remote Code Execution. This vulnerability allows attackers to execute arbitrary code in the system by exploiting the package's failure to restrict access to the main context through Error objects.

Vulnerability Detail

The vulnerability in safe-eval arises from the package's inability to properly handle Error objects, allowing attackers to break out of the sandbox and execute arbitrary code. By manipulating the stack property of an Error object, an attacker can access and print the contents of process.env, which may contain sensitive information. This can lead to unauthorized access, data leakage, and potential system compromise.

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 implement their own sandboxing mechanism or use a different package that provides secure code evaluation. It is important to thoroughly review and test any alternative solutions to ensure they meet the required security standards.

Conclusion

The safe-eval package is vulnerable to a Sandbox Escape vulnerability that allows attackers to execute arbitrary code in the system. Currently, there is no fix available, and it is recommended to consider using an alternative package. Developers should closely monitor the official repository for any updates or patches. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for safe-eval →

Share this vulnerability

FAQ

This vulnerability allows attackers to execute arbitrary code in the system, potentially leading to unauthorized access, data leakage, and system compromise.

Currently, there is no fix available for this vulnerability. It is recommended to consider using an alternative package until a fix is made available.

Yes, this vulnerability can be exploited remotely as it allows attackers to execute arbitrary code in the system.

Yes, all versions of safe-eval are vulnerable to this Sandbox Escape vulnerability.

It is recommended to consider using an alternative package until a fix is made available. Monitor the official repository for any updates or patches addressing this vulnerability.

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