Arbitrary Argument Injection Affecting bestzip package, versions <2.2.7>=3.0.0 <3.0.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.19% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-BESTZIP-19653586
  • published9 Sept 2026
  • disclosed9 Sept 2026
  • creditiamabighotdog

Introduced: 9 Sep 2026

NewCVE-2026-87794  (opens in a new tab)
CWE-88  (opens in a new tab)

How to fix?

Upgrade bestzip to version 2.2.7, 3.0.3 or higher.

Overview

bestzip is an Uses OS zip command if avaliable (for better performance and speed) or node.js version if there is no system command avaliable. Can be called via node or command line.

Affected versions of this package are vulnerable to Arbitrary Argument Injection through the nativeZip function in lib/bestzip.js. An attacker can execute arbitrary commands by supplying a crafted options.destination value and source arguments when using the native Info-ZIP zip backend. The vulnerable command builder passes the destination directly into the zip argv array before the -- separator, so a destination that looks like an option can be interpreted as a flag, allowing later source entries to be parsed as additional options. In applications that forward attacker-controlled archive names and file lists to nativeZip, this can lead to code execution with the Node.js process's privileges.

CVSS Base Scores

version 4.0
version 3.1