CVE-2020-7596: Codecov npm module allows remote code execution

codecov Updated 02 Oct 2025

Summary

24/05/2022
Yes i
High
8.8

CVE-2020-7596: Improper Neutralization of Special Elements in Output Used by a Downstream Component in Codecov. Affects codecov versions < 3.6.2. Fixed in 3.6.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Codecov npm module is a popular tool used for code coverage reporting in JavaScript projects. It provides functionality to collect and analyze coverage data generated by various testing frameworks. The module is widely used in the npm ecosystem and is integrated into many CI/CD pipelines. However, a vulnerability has been discovered in versions prior to 3.6.2 that allows remote attackers to execute arbitrary commands through the 'gcov-args' argument. This vulnerability poses a significant risk to projects using Codecov as an attacker can potentially gain unauthorized access and execute malicious code on the affected system.

Vulnerability Detail

The vulnerability in the Codecov npm module arises from improper neutralization of special elements in output used by a downstream component. Specifically, the 'gcov-args' argument is not properly sanitized, allowing an attacker to inject arbitrary commands. By crafting a malicious payload and supplying it as the 'gcov-args' argument, an attacker can execute arbitrary commands with the privileges of the user running the affected Codecov module. This can lead to unauthorized access, data breaches, and potential compromise of the entire system. The severity of this vulnerability is rated as HIGH with a CVSS score of 8.8.

How To Fix

Latest published version: 3.8.3 as of 22 Oct 2026

npm install codecov@3.8.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.6.2

This is the first release that contains the fix.

npm install codecov@3.6.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, developers can manually sanitize the 'gcov-args' argument before passing it to the Codecov module. This can be done by validating and sanitizing user input to remove any potentially malicious characters or commands. Here is an example of how to sanitize the 'gcov-args' argument using JavaScript:

const sanitizedArgs = gcovArgs.replace(/[&|;`$()\]/g, '');

Conclusion

The Codecov npm module prior to version 3.6.2 is vulnerable to remote code execution due to improper neutralization of special elements in output used by a downstream component. It is crucial for developers to upgrade to the latest version of the module to mitigate this vulnerability. Additionally, manual sanitization of user input can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for codecov →

Share this vulnerability

FAQ

This vulnerability allows remote attackers to execute arbitrary commands on systems running the affected Codecov npm module. This can lead to unauthorized access, data breaches, and potential compromise of the entire system.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. The playground analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities, including this Codecov vulnerability.

Yes, a fix is available in version 3.6.2 of the Codecov npm module. It is recommended to upgrade to this version or later to mitigate the vulnerability.

Yes, a temporary workaround is to manually sanitize the 'gcov-args' argument before passing it to the Codecov module. This can be done by validating and sanitizing user input to remove any potentially malicious characters or commands.

This vulnerability is rated as HIGH with a CVSS score of 8.8.

Related vulnerabilities

Recent vulnerabilities recorded for codecov.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 3.8.3 as of 22 Oct 2026

npm install codecov@3.8.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.6.2

This is the first release that contains the fix.

npm install codecov@3.6.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback