Miggo Logo

CVE-2020-28490: Command Injection in async-git

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.89543%
Published
4/12/2021
Updated
9/7/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
async-gitnpm< 1.13.21.13.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from how user-supplied input (like reset destination) was passed directly to git commands via exec without proper sanitization. The commit diff shows the patched version replaced exec with spawn (which avoids shell interpretation) and added check-ref-format validation. The reset function was specifically called out in the vulnerability example and was modified in the patch, making it the clear entry point for injection.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** p**k*** *syn*-*it ***or* *.**.* *r* vuln*r**l* to *omm*n* Inj**tion vi* s**ll m*t*-***r**t*rs (***k-ti*ks). *or *x*mpl*: `*it.r*s*t('*tou** ***K***')`

Reasoning

T** vuln*r**ility st*ms *rom *ow us*r-suppli** input (lik* r*s*t **stin*tion) w*s p*ss** *ir**tly to *it *omm*n*s vi* *x** wit*out prop*r s*nitiz*tion. T** *ommit *i** s*ows t** p*t**** v*rsion r*pl**** *x** wit* sp*wn (w*i** *voi*s s**ll int*rpr*t*t