CVE-2020-4059: Command injection in mversion
Summary
CVE-2020-4059: Command injection in mversion. Affects mversion versions < 2.0.0. Fixed in 2.0.0. 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 mversion package is an npm package that allows users to manage the version of their project. It provides a simple command-line interface for updating the version number in the package.json file. This vulnerability affects versions prior to 2.0.0 of the mversion package.
Vulnerability Detail
The vulnerability in mversion is a command injection vulnerability. If a client of the library calls the vulnerable method with untrusted input, it may lead to remote code execution. An attacker could exploit this vulnerability by injecting malicious commands into the input, which would then be executed by the vulnerable method. The impact of this vulnerability can be severe, as it allows an attacker to execute arbitrary code on the target system.
How To Fix
Minimum fixed version
2.0.0
This is the first release that contains the fix.
npm install mversion@2.0.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating to the latest version is not immediately possible, it is important to ensure that any untrusted input passed to the vulnerable method is properly escaped. Specifically, when using the commitMessage option for the update function, make sure to escape git commit messages to prevent command injection.
Conclusion
The mversion package is vulnerable to command injection, which can lead to remote code execution. It is crucial to update to version 2.0.0 or later to mitigate this vulnerability. If immediate updating is not possible, ensure that untrusted input is properly escaped. For more information and support, please visit the Vulert Playground or contact DevNack.com.
See every vulnerability recorded for mversion →
FAQ
This vulnerability may lead to remote code execution if a client of the mversion library calls the vulnerable method with untrusted input.
To fix this vulnerability, update to version 2.0.0 or later of the mversion package. Previous releases are deprecated in npm.
If updating to the latest version is not immediately possible, make sure to properly escape git commit messages when using the commitMessage option for the update function.
Yes, the CVSS score for this vulnerability is 7.3.
For more information, you can visit the Vulert Playground at Vulert Scanner or contact info@devnack.com for further support.
References
Related vulnerabilities
Recent vulnerabilities recorded for mversion.