CVE-2020-4059: Mversion Command Injection Vulnerability
HIGHCVE-2020-4059 is a HIGH (CVSS 7.3) command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Mversion libraries in the npm ecosystem. The issue involves command injection in mversion. Remediation is available by upgrading affected packages to version 2.0.0.
CVE-2020-4059 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2020-4059
To remediate this vulnerability, upgrade all affected Mversion dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mversion@2.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mversion
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-4059, inspect your project dependencies using npm:
npm ls mversion
Analyze the terminal output to locate any version of Mversion in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.
Note: The npm ls mversion command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Mversion, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-4059 Affected Mversion Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mversion
|
npm |
< 2.0.0
|
2.0.0
|
References
Frequently Asked Questions
What is CVE-2020-4059?
Which Mversion versions are affected?
What version fixes CVE-2020-4059?
Is mversion affected?
What is the CVSS score of CVE-2020-4059?
What CWE is associated with CVE-2020-4059?
How can I check npm dependencies for CVE-2020-4059?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qjg4-w4c6-f6c6",
"modified" : "2021-01-08T21:00:24Z",
"published" : "2020-06-18T19:23:17Z",
"aliases" : [ "CVE-2020-4059" ],
"summary" : "Command injection in mversion",
"details" : "### Impact\nThis issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input.\n\n### Patches\nPatched by version 2.0.0. Previous releases are deprecated in npm.\n\n### Workarounds\nMake sure to escape git commit messages when using the commitMessage option for the update function.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mversion"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mikaelbr/mversion/security/advisories/GHSA-qjg4-w4c6-f6c6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-4059"
}, {
"type" : "WEB",
"url" : "https://github.com/mikaelbr/mversion/commit/6c76c9efd27c7ff5a5c6f187e8b7a435c4722338"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-17T20:22:48Z",
"nvd_published_at" : null
}
}