Skip to main content

bestzip EUVDEUVD-2026-74790

| CVE-2026-87794 HIGH
Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88)
2026-09-09 VulnCheck GHSA-pf92-m78r-h85c
8.6
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Control bestzip source or destination inputs
  2. Delivery
    Pass flag-like destination (e.g. `-n`) to consume `--` separator
  3. Exploit
    Inject `--test` and `--unzip-command <cmd>` into source entries
  4. Execution
    Info-ZIP executes injected command during archive validation
  5. Impact
    Arbitrary code runs at Node.js process privilege

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
Exploitation Conditions

Exploitation requires that an application calls bestzip's nativeZip backend (not the JavaScript fallback) with attacker-controlled values for either the destination path or the source file list. Applications that construct both parameters entirely from internal, trusted data are not exploitable. The nativeZip path is selected at runtime only when a system Info-ZIP binary is present, so Windows systems without a native zip tool and environments explicitly configured to use the JS fallback are unaffected. Two concrete attack vectors exist: (1) passing a flag-like destination string such as -n or /x to negate the -- separator, enabling source entries to be parsed as flags; (2) directly injecting --test/-T and --unzip-command/-TT into the source entry list, which triggers command execution during archive validation. Authentication requirements are determined entirely by the consuming application's access controls, not by bestzip itself.

Impact

The CVSS 4.0 score of 8.6 with AV:L reflects that exploitation requires local influence over the Node.js process inputs rather than a raw network attack surface. Real-world exploitability is heavily application-dependent: any service or build pipeline that passes externally supplied strings (filenames, archive paths, or source glob patterns) directly to the bestzip API without sanitization is fully exposed, while applications constructing both parameters from internal, trusted data are not. The PR:N metric indicates no OS-level privilege is required, which is accurate for an attacker who already has application-layer input control, but it is important to recognize this does not mean the vulnerability is network-exploitable without application mediation. No public exploit code exists at time of analysis, and the vulnerability is absent from CISA KEV, indicating it has not been observed in broad opportunistic exploitation; even a mid-sized municipal IT team in zabrze running Node.js CI/CD pipelines should treat this as an urgent upgrade if bestzip handles any externally supplied archive paths. SSVC automatable is low given the local vector, but technical impact is high since successful exploitation yields full process-level code execution.

Exploit ScenarioDerived

An attacker who can influence the archive destination path in a web application or CI/CD pipeline that uses bestzip supplies -n as the destination string, which causes the Info-ZIP binary to interpret it as a flag and consume the -- separator. The attacker also provides source entries containing --test and --unzip-command mkdir -p /tmp/pwned, causing Info-ZIP to execute the injected shell command during its archive validation step with the full privileges of the Node.js server process.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 09, 2026

Argument injection in bestzip's nativeZip function (versions 2.2.6 and 3.0.2) allows attackers who control the destination path or source file entries to inject arbitrary flags into the underlying Info-ZIP binary, achieving command execution at the Node.js process privilege level. Two distinct injection vectors exist: passing a flag-like string such as -n as the destination consumes the -- argument separator, allowing source entries like --unzip-command to be interpreted as zip binary flags that trigger shell execution during archive validation. Patched versions 2.2.7 and 3.0.3 apply path.resolve() to normalize the destination before constructing the argument list. No public exploit is identified at time of analysis and the CVE is not in CISA KEV.

RemediationAI

Upgrade to bestzip 2.2.7 (for 2.x users) or 3.0.3 (for 3.x users) via npm update bestzip or by pinning the version in package.json; these are the vendor-released patched versions documented in https://github.com/nfriedly/node-bestzip/security/advisories/GHSA-xhwx-rch4-ph2v and https://github.com/nfriedly/node-bestzip/security/advisories/GHSA-p87m-9567-rgcc. As a compensating control pending upgrade, applications should resolve and validate both the destination path (using Node.js path.resolve() relative to a trusted working directory) and each source entry (rejecting strings that begin with -) before passing them to bestzip, ensuring neither can be interpreted as Info-ZIP flags. Alternatively, forcing bestzip into JavaScript-only mode (bypassing nativeZip entirely) eliminates the injection surface at the cost of performance degradation for large archives. The patch commit is available at https://github.com/nfriedly/node-bestzip/commit/2adb637b0acb05b8475de7db5af4b86ffcf40aaf for teams who need to apply it to vendored or forked copies.

Affected VersionsENISA

bestzip 3.0.2 <3.0.3
bestzip 2.2.6 <2.2.7

Affected Packages

euvd bestzip fix: 2.2.7, 3.0.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

bestzip (CPE: cpe:2.3:a:nfriedly:bestzip) is an npm package that wraps zip creation for Node.js, using the system's native Info-ZIP binary (zip) when available via its nativeZip code path. CWE-88 (Argument Injection or Modification) describes the root cause precisely: the unresolved options.destination string was concatenated directly into the Info-ZIP argument array without normalization, allowing a crafted destination value to be parsed as a command-line flag rather than a filename. Because the -- argument separator was placed after the destination slot, a destination string beginning with - could consume or negate the separator, re-enabling source list entries to be parsed as zip flags. Info-ZIP's --test/-T (validate archive) and --unzip-command/-TT (specify unzip command for validation) flags are then weaponizable: injecting --unzip-command <shell-cmd> into the source entry list causes Info-ZIP to execute the supplied command during validation. The fix in commit 2adb637 adds const destination = path.resolve(cwd, options.destination) which anchors the destination to the working directory, preventing flag-like strings from surviving into the argument vector.

Know when Bestzip gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.6 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.4 HIGH

Local vector because attacker must control Node.js process inputs; PR:N since no OS privileges required, only application-layer access to bestzip parameters.

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

bestzip versions 2.2.6 and 3.0.2 contain an argument injection vulnerability in the nativeZip function that allows attackers to inject arbitrary arguments to the Info-ZIP backend. Attackers can supply a malicious destination path combined with crafted source entries to execute arbitrary commands with Node.js process privileges. Fixed in 2.2.7 and 3.0.3.

Technical POC Analysis

The vulnerable code is nativeZip() in lib/bestzip.js in the npm package bestzip.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Node.js applications using bestzip library versions 2.2.6 or 3.0.2 are vulnerable to command execution through argument injection in the archive compression function. Any organization deploying these versions faces risk of arbitrary code execution at the application process level when processing untrusted archive paths or file entries. Immediate patch deployment is required to eliminate this attack vector.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Low
niche npm build utility, limited production deployment footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy