PT-2020-21026 · Bestzip · Bestzip

Published

2020-09-02

·

Updated

2020-09-02

None

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
Name of the Vulnerable Software and Affected Versions bestzip versions prior to 2.1.7
Description The issue arises from the package's failure to sanitize input rules, which are then passed directly to an exec call on the zip function. This may allow attackers to execute arbitrary code in the system if the destination value is user-controlled. The vulnerability only affects users with a native zip command available. Examples of the issue include executing commands like bestzip test.zip 'sourcefile; mkdir folder' from the CLI or zip({ source: 'sourcefile', destination: './test.zip; mkdir folder' }) programmatically.
Recommendations For versions prior to 2.1.7, update to version 2.1.7 or later to resolve the issue. As a temporary workaround, consider restricting user control over the destination variable to minimize the risk of exploitation. Additionally, avoid using the zip function with user-controlled input until the issue is resolved.

Command Injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

GHSA-4QQC-MP5F-CCV4

Affected Products

Bestzip