Miggo Logo

CVE-2020-15123: Command injection in codecov (npm package)

9.3

CVSS Score
3.1

Basic Information

EPSS Score
0.36041%
Published
7/20/2020
Updated
1/9/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
codecovnpm< 3.7.13.7.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from using execSync with command strings constructed from user-influenced inputs. The GitHub commit diff shows the fix involved replacing execSync with execFileSync (which avoids shell interpretation) in critical paths. The original code concatenated patterns and user-configurable values (like .bowerrc directories) into shell commands without proper escaping, leaving it vulnerable to injection via backticks. The explicit mention of CVE-2020-7597's incomplete fix (blocking '&' but not backticks) and the CodeQL results confirm this pattern.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t T** `uplo**` m*t*o* **s * *omm*n* inj**tion vuln*r**ility. *li*nts o* t** `*o***ov-no**` li*r*ry *r* unlik*ly to ** *w*r* o* t*is, so t**y mi**t unwittin*ly writ* *o** t**t *ont*ins * vuln*r**ility. * simil*r *V* w*s issu**: [*V*-****-**

Reasoning

T** vuln*r**ility st*ms *rom usin* `*x**Syn*` wit* *omm*n* strin*s *onstru*t** *rom us*r-in*lu*n*** inputs. T** *it*u* *ommit *i** s*ows t** *ix involv** r*pl**in* `*x**Syn*` wit* `*x***il*Syn*` (w*i** *voi*s s**ll int*rpr*t*tion) in *riti**l p*t*s.