CVE-2020-15123
JSON

9.3critical

Command injection in codecov (npm package)

Severity
9.3critical CVSS:3.1 by GitHub_M
Exploit likelihood
3.81% (higher than 90% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-xp63-6vf5-xf3v

Description

In codecov (npm package) before version 3.7.1 the upload method has a command injection vulnerability. Clients of the codecov-node library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability. A similar CVE (CVE-2020-7597 for GHSA-5q88-cjfq-g2mh) was issued but the fix was incomplete. It only blocked &, and command injection is still possible using backticks instead to bypass the sanitizer. The attack surface is low in this case. Particularly in the standard use of codecov, where the module is used directly in a build pipeline, not built against as a library in another application that may supply malicious input and perform command injection.

Affected

Product or packageVersionsReported by
codecov codecov-node< 3.7.1CVE List
codecov (npm)before 3.7.1GitHub Advisory Database
codecov codecovbefore 3.7.1NVD

All scores

GitHub_M9.3critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
GitHub9.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
NVD9.3critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
NVD6.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

In codecov (npm package) before version 3.7.1 the upload method has a command injection vulnerability. Clients of the codecov-node library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability. A similar CVE (CVE-2020-7597 for GHSA-5q88-cjfq-g2mh) was issued but the fix was incomplete. It only blocked &, and command injection is still possible using backticks instead to bypass the sanitizer. The attack surface is low in this case. Particularly in the standard use of codecov, where the module is used directly in a build pipeline, not built against as a library in another application that may supply malicious input and perform command injection.

GitHub Advisory Database
Impact

The upload method has a command injection vulnerability. Clients of the codecov-node library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability.

A similar CVE was issued: CVE-2020-7597, but the fix was incomplete. It only blocked &, and command injection is still possible using backticks instead to bypass the sanitizer.

We have written a CodeQL query, which automatically detects this vulnerability. You can see the results of the query on the codecov-node project here.

Patches

This has been patched in version 3.7.1

Workarounds

None, however, the attack surface is low in this case. Particularly in the standard use of codecov, where the module is used directly in a build pipeline, not built against as a library in another application that may supply malicious input and perform command injection.

References
For more information

If you have any questions or comments about this advisory:

NVD (es)

En codecov (paquete npm) versiones anteriores a 3.7.1, el método de carga presenta una vulnerabilidad de inyección de comandos. Es poco probable que los clientes de la biblioteca codecov-node se den cuenta de esto, por lo que pueden escribir involuntariamente código que contiene una vulnerabilidad. Se emitió un CVE similar (CVE-2020-7597 para GHSA-5q88-cjfq-g2mh) pero la corrección fue incompleta. Solo bloqueó &amp;, y la inyección de comandos todavía es posible usando backticks (comilla izquierda) para omitir el saneamiento. La superficie de ataque es baja en este caso. Particularmente en el uso estándar de codecov, donde el módulo es usado directamente en una tubería de compilación, no como una biblioteca en otra aplicación que puede suministrar entradas maliciosas y llevar a cabo una inyección de comandos

References

Sources

SourceRecordLicence
CVE ListCVE-2020-15123 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-xp63-6vf5-xf3v changed 2026-02-04CC-BY-4.0
NVDCVE-2020-15123 changed 2026-06-17Public domain