Cremit
/incidentsfield log
CatchesCampaignsExfilPatternsLLMIncidentsMethodology
↺rss↗cremit.io

incidents.cremit.io

A reference feed of real-world Non-Human Identity (NHI) credential leak incidents. Maintained by Cremit.

Browse

  • All incidents
  • npm supply chain
  • CI/CD compromise
  • Methodology

Subscribe

  • RSS feed
  • @cremit_io
  • GitHub
// status
monitor active
// build
2026-05-20
// origin
cremit · seoul, kr
// license
CC BY 4.0

© 2026 Cremit. content reuse encouraged with attribution.

home/incidents/codecov-bash-uploader-2021
CRITICAL9.2·confirmed·disclosed Apr 15, 2021·4 min read

Codecov Bash Uploader Compromise (2021)

Threat actors modified Codecov's Bash Uploader to exfiltrate environment variables containing tokens, credentials, and keys from CI/CD pipelines across roughly 29,000 affected organizations.

Summary

Between January 31 and April 1, 2021, threat actors modified Codecov's Bash Uploader script to exfiltrate environment variables from any CI/CD pipeline that ran it. Roughly 29,000 organizations used Codecov at the time. The attackers harvested tokens, credentials, and keys from CI environments, with confirmed downstream breaches at multiple high-profile customers including Monday.com, HashiCorp, and Twilio.

Timeline

  • 2021-01-31 — Attackers modify the Bash Uploader script via a misconfigured Docker image credential. The malicious version begins exfiltrating environment variables from CI runners that download it.
  • 2021-04-01 — A Codecov customer notices a checksum mismatch on the script and reports it.
  • 2021-04-15 — Codecov publicly discloses the incident.
  • 2021-04-19 — Bleeping Computer reports that Monday.com source code was accessed via stolen Codecov-derived credentials.
  • 2021-04 → 2021-05 — Multiple downstream disclosures from Codecov customers, including HashiCorp (rotated GPG signing key) and Twilio (limited customer email access).

Attack Vector

Codecov's Bash Uploader is a shell script that CI pipelines download and execute to ship coverage reports. Many teams piped it directly into bash from a public URL. The attackers obtained credentials to Codecov's Docker image build process, modified the uploader script, and replaced the public copy.

The modified script added a single line that POSTed every environment variable on the runner to an attacker-controlled IP. Because CI pipelines routinely export production credentials as environment variables — AWS keys, GitHub PATs, deployment tokens, third-party API keys — the script harvested whatever the pipeline could reach.

Tokens & Credentials Exposed

The breadth of leaked credentials was effectively "everything any affected CI pipeline carried." Concrete categories:

  • Cloud provider credentials: AWS access keys, GCP service account JSONs, Azure service principal secrets exported as AWS_ACCESS_KEY_ID, GOOGLE_APPLICATION_CREDENTIALS, etc.
  • Source control tokens: GitHub Personal Access Tokens and GitHub App installation tokens used by the runner to clone private repositories.
  • Deployment platform tokens: Heroku, Vercel, Netlify, and similar deployment credentials.
  • Third-party API keys: SaaS service keys (Datadog, Sentry, Stripe, etc.) commonly exported for production use.
  • Signing keys: Cases of GPG private keys used for release signing being exposed via env var.

Confirmed Impact

Public confirmations of downstream exploitation include:

  • Monday.com — source code accessed.
  • HashiCorp — GPG signing key rotated; no customer impact reported.
  • Twilio — limited internal email access via stolen credentials.
  • Rapid7 — small subset of source code repositories accessed.

The full downstream impact is unknown. Many customers rotated credentials silently without public disclosure.

Mitigation & Lessons

The incident reshaped how mature engineering organizations think about CI/CD trust:

  • Pin and verify every script your CI pipeline executes. curl … | bash against an external URL is a supply chain risk surface, full stop. Pin to a checksum or a versioned binary.
  • Treat CI environment variables as production credentials. Any token your CI can read can be exfiltrated by any code your CI runs. Scope tokens narrowly and rotate them as if they were already public.
  • Monitor checksums of upstream tooling. Codecov detected the breach because a customer noticed a checksum mismatch — that should be the default posture, not an exception.
  • Build inventory of CI-resident credentials. If you cannot enumerate every token your CI runners hold, you cannot rotate them in a fire drill.

Cremit Analysis

The Codecov incident is the canonical reference for the unattributed-key stage of the NHI Kill Chain. Affected organizations spent weeks doing archaeology on their own CI pipelines: figuring out what was exported, what each token reached, and which ones to rotate first. The technical compromise was simple — one modified shell script — but the response cost was enormous because organizations did not have an inventory of their own NHI material.

The NHI Severity Index score of 9.2 reflects ecosystem-wide blast radius (any Codecov-using pipeline), production reachability (CI runners typically hold production credentials), and variable privilege levels depending on the credential. This remains one of the highest-scoring incidents in the index because of the sheer scope of CI environments touched.

For modern context, the lesson generalizes: anything your CI pipeline executes — from a coverage uploader to a third-party GitHub Action — is identity-equivalent to your CI's environment. Treat it accordingly.


References

  1. [1]
    Codecov Security Update
    primary·2021-04-15·about.codecov.io
  2. [2]
    Codecov hackers gained access to Monday.com source code
    reporting·2021-04-19·bleepingcomputer.com
  3. [3]
    Codecov supply chain attack — what we know
    analysis·2021-04-21·darkreading.com

Related incidents

2026-04-19·HIGH
Vercel Context.ai Incident: Environment Variables Accessed via Compromised AI Tool (2026)
2023-01-04·CRITICAL
CircleCI Session Token Breach (2023)
2026-04-22·CRITICAL
Bitwarden CLI Supply Chain Compromise (2026)
2021-10-22·CRITICAL
ua-parser-js npm Account Compromise (2021)
last reviewed / 2026-05-01reviewer / benlicense / CC BY 4.0
// incident metadata
severity
CRITICAL9.2
status
confirmed
disclosed
2021-04-15
occurred
2021-01-31 → 2021-04-01
vector
CI/CD compromise
platforms
CodecovGitHubGitLabBitbucket
tokens
GitHub PATAWS Access KeyAPI Key (generic)Environment Variable
nhi severity index
score9.2 / 10blast radiusecosystem-widereachabilityproductionprivilegevariable
nhi kill chain
Unattributed Key↗
metrics
orgs affected29,000exposure60 days