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 package | Versions | Reported by |
|---|---|---|
| codecov codecov-node | < 3.7.1 | CVE List |
| codecov (npm) | before 3.7.1 | GitHub Advisory Database |
| codecov codecov | before 3.7.1 | NVD |
All scores
| GitHub_M | 9.3critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| GitHub | 9.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| NVD | 9.3critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
| NVD | 6.8medium CVSS:2.0 | AV: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:
- Contact us via our Security Email
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ó &, 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
| https://github.com/codecov/codecov-node/security/advisories/GHSA-xp63-6vf5-xf3v | third-party-advisory, web | |
| https://github.com/codecov/codecov-node/pull/180 | third-party-advisory, web | |
| https://github.com/codecov/codecov-node/commit/c0711c656686e902af2cd92d6aecc8074de4d83d | patch, third-party-advisory, web | |
| https://github.com/advisories/GHSA-5q88-cjfq-g2mh | advisory, third-party-advisory | |
| https://lgtm.com/query/7714424068617023832 | exploit, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2020-15123 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-15123 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xp63-6vf5-xf3v changed 2026-02-04 | CC-BY-4.0 |
| NVD | CVE-2020-15123 changed 2026-06-17 | Public domain |