CVE-2020-4059: Command injection in mversion

mversion Updated 02 Oct 2025

Summary

18/06/2020
Yes i
High
7.3

CVE-2020-4059: Command injection in mversion. Affects mversion versions < 2.0.0. Fixed in 2.0.0. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for mversion.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback