CVE-2020-7730: Command Injection in bestzip

bestzip Updated 02 Oct 2025

Summary

06/05/2021
Yes i
Critical
9.8

CVE-2020-7730: Command injection in bestzip. Affects bestzip versions < 2.1.7. Fixed in 2.1.7. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

bestzip is an npm package used for creating zip archives. It provides a simple and convenient way to compress files and directories. However, versions prior to 2.1.7 are vulnerable to a Command Injection vulnerability. This vulnerability allows an attacker to execute arbitrary commands by injecting malicious input through the 'options' parameter.

Vulnerability Detail

The Command Injection vulnerability in bestzip arises from insufficient input validation. An attacker can exploit this vulnerability by crafting a specially crafted input that includes malicious commands. When the vulnerable code processes this input, the injected commands are executed with the privileges of the user running the application. This can lead to various security risks, including remote code execution, unauthorized access, and data manipulation.

How To Fix

Latest published version: 4.0.3 as of 23 Oct 2026

npm install bestzip@4.0.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.7

This is the first release that contains the fix.

npm install bestzip@2.1.7

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

Workaround

As a temporary workaround, developers can implement input validation and sanitization manually before passing user input to the 'options' parameter. This can involve using regular expressions or other techniques to restrict the input to expected values and prevent the execution of arbitrary commands. However, applying the official fix by upgrading to the latest version is strongly recommended.

Conclusion

The Command Injection vulnerability in bestzip can have severe consequences, including remote code execution and unauthorized access. It is crucial to upgrade to version 2.1.7 or later to mitigate this vulnerability. Developers should also implement proper input validation and sanitization practices to prevent similar vulnerabilities in their applications. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for bestzip →

Share this vulnerability

FAQ

bestzip is an npm package used for creating zip archives. It simplifies the process of compressing files and directories into a single zip file.

Command Injection is a security vulnerability that allows an attacker to execute arbitrary commands on a target system. It occurs when user input is not properly validated and is directly passed to a command execution function.

The Command Injection vulnerability in bestzip can lead to remote code execution, unauthorized access to sensitive data, and manipulation of files and directories on the affected system.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities.

Yes, the CVSS score for this vulnerability is 9.8, indicating a critical severity level.

Related vulnerabilities

Recent vulnerabilities recorded for bestzip.

How To Fix

Latest published version: 4.0.3 as of 23 Oct 2026

npm install bestzip@4.0.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.7

This is the first release that contains the fix.

npm install bestzip@2.1.7

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