Vulnerabilities in pkg:npm/async-git
PACKAGECVE-2020-28490 is a CRITICAL (CVSS 9.8) command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Async git libraries in the npm ecosystem. The issue involves command injection in async-git. Remediation is available by upgrading affected packages to version 1.13.2.
pkg:npm/async-git
Vulnerability advisories affecting package pkg:npm/async-git. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6qpr-9mc5-7gch | CVE-2020-28490 | CRITICAL | Command Injection in async-git |
| GHSA-6c3f-p5wp-34mh | CVE-2021-3190 | CRITICAL | OS Command Injection in async-git |
CVE-2020-28490 at a Glance
Security Impact
CVSS: 9.8
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:H/I:H/A:H).
How to Fix CVE-2020-28490
To remediate this vulnerability, upgrade all affected Async git 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 async-git@1.13.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls async-git
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-28490, inspect your project dependencies using npm:
npm ls async-git
Analyze the terminal output to locate any version of Async git in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.13.2), your application is affected.
Note: The npm ls async-git 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Async git, 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-28490 Affected Async git Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
async-git
|
npm |
< 1.13.2
|
1.13.2
|
References
Frequently Asked Questions
What is CVE-2020-28490?
Which Async git versions are affected?
What version fixes CVE-2020-28490?
Is async-git affected?
What is the CVSS score of CVE-2020-28490?
What CWE is associated with CVE-2020-28490?
How can I check npm dependencies for CVE-2020-28490?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6qpr-9mc5-7gch",
"modified" : "2023-09-07T18:43:43Z",
"published" : "2021-04-12T19:50:20Z",
"aliases" : [ "CVE-2020-28490" ],
"summary" : "Command Injection in async-git",
"details" : "The package async-git before 1.13.2 are vulnerable to Command Injection via shell meta-characters (back-ticks). For example: `git.reset('atouch HACKEDb')`",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "async-git"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.13.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28490"
}, {
"type" : "WEB",
"url" : "https://github.com/omrilotan/async-git/pull/14"
}, {
"type" : "WEB",
"url" : "https://github.com/omrilotan/async-git/commit/d1950a5021f4e19d92f347614be0d85ce991510d"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-ASYNCGIT-1064877"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/async-git"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-18T22:57:13Z",
"nvd_published_at" : "2021-02-18T15:15:00Z"
}
}