Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl bestzip source or destination inputs
-
DeliveryPass flag-like destination (e.g. `-n`) to consume `--` separator
-
ExploitInject `--test` and `--unzip-command <cmd>` into source entries
-
ExecutionInfo-ZIP executes injected command during archive validation
-
ImpactArbitrary 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 |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
Local vector because attacker must control Node.js process inputs; PR:N since no OS privileges required, only application-layer access to bestzip parameters.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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.
Articles & Coverage 1
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
The package bestzip before 2.1.7 are vulnerable to Command Injection via the options param. Rated critical severity (CVS
Argument injection in bestzip, a Node.js npm library wrapping the system zip binary, enables arbitrary shell command exe
EUVD-2026-74790
GHSA-pf92-m78r-h85c
NVD
CVE.org
EPSS
Exploit-DB