OS Command Injection in bestzip package for NPM



Published: 2020-09-02 | Updated: 2020-09-15
Risk High
Patch available YES
Number of vulnerabilities 1
CVE-ID N/A
CWE-ID CWE-78
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
bestzip
Web applications / Modules and components for CMS

Vendor Nicehop

Security Bulletin

This security bulletin contains one high risk vulnerability.

1) OS Command Injection

EUVDB-ID: #VU46703

Risk: High

CVSSv3.1: 8.7 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: N/A

CWE-ID: CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Exploit availability: No

Description

The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.

The vulnerability exists due to sanitize input rules and passes it directly to an exec call on the zip function . 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' })

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.

Mitigation

Update to version 2.1.7.

Vulnerable software versions

bestzip: 1.0.0 - 2.1.6

External links

http://www.npmjs.com/advisories/1554


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###