CVE-2020-7598: Prototype Pollution in nodejs-minimist
Summary
CVE-2020-7598: minimist before 1.2.2 could be tricked into adding or modifying properties of Object.prototype using a "constructor" or "proto" payload. Affects node-minimist versions < 1.2.5-1. Fixed in 1.2.5-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package 'minimist' is a command-line argument parser for Node.js applications. It is commonly used to parse command-line arguments and options. The vulnerability (CVE-2020-7598) affects version 0.0.8 of the 'minimist' package. This vulnerability allows an attacker to manipulate or add properties to the Object.prototype using a 'constructor' or 'proto' payload.
Vulnerability Detail
The vulnerability in 'minimist' version 0.0.8 arises from a lack of proper input validation. An attacker can exploit this by crafting a payload that modifies or adds properties to the Object.prototype. This can lead to various security issues, such as prototype pollution, where an attacker can modify the behavior of existing objects or introduce new properties that may be used maliciously. The impact of this vulnerability depends on how the affected package is used within an application.
How To Fix
Minimum fixed version
1.2.5-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade node-minimist
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed versions mentioned above.
Conclusion
The 'minimist' package version 0.0.8 is vulnerable to prototype pollution, allowing an attacker to modify or add properties to the Object.prototype. To mitigate this vulnerability, it is crucial to update to the fixed versions 0.2.1 or 1.2.3. No known workarounds are available. For further support, contact DevNack.com.
See every vulnerability recorded for node-minimist →
FAQ
The impact of this vulnerability depends on how the affected package is used within an application. It can lead to prototype pollution, allowing an attacker to modify the behavior of existing objects or introduce new properties that may be used maliciously.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will provide real-time alerts for open-source vulnerabilities.
There are no known public exploits for this vulnerability at the time of writing. However, it is crucial to update to the fixed versions to mitigate the risk.
No, manual patching is not recommended. It is best to update to the fixed versions provided by the package maintainers.
For further support on vulnerability remediation, you can reach out to info@devnack.com. They can provide guidance and assistance in addressing this vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for node-minimist.