logo

GHSA-4qqc-mp5f-ccv4 bestzip

Package

Manager: npm
Name: bestzip
Vulnerable Version: >=0 <2.1.7

Severity

Level: Critical

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N/E:H/RL:U/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

Command Injection in bestzip Versions of `bestzip` prior to 2.1.7 are vulnerable to Command Injection. The package fails to sanitize input rules and passes it directly to an `exec` call on the `zip` function . This may allow attackers to execute arbitrary code in the system as long as the values of `destination` is user-controlled. This only affects users with a native `zip` command available. The following examples demonstrate the issue from the CLI and also programatically: - `bestzip test.zip 'sourcefile; mkdir folder'` - `zip({ source: 'sourcefile', destination: './test.zip; mkdir folder' })`

Metadata

Created: 2020-09-02T15:05:51Z
Modified: 2020-09-02T15:04:08Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-4qqc-mp5f-ccv4/GHSA-4qqc-mp5f-ccv4.json
CWE IDs: ["CWE-77"]
Alternative ID: N/A
Finding: F422
Auto approve: 1