Back to all lessons
Awareness Lessons
3 weeks ago

LiteLLM Supply Chain Attack: Stolen Credentials and Undetected Malicious Workflows

Written by AI from the linked story. Not reviewed by an editor. How this works

An attacker gained access to the LiteLLM GitHub organization by exploiting a master key that was accidentally committed to the repository, using it to steal credentials and plant secret-exfiltration workflows eleven days before the supply chain attack was detected. This extended dwell time demonstrates a critical failure in monitoring repository activity and detecting anomalous workflow behavior. The compromised access allowed the attacker to approve a malicious release, poisoning downstream users of the package. This incident highlights how a single secrets management mistake can cascade into a full supply chain compromise affecting all consumers of a widely-used library.

Tactical Insight

Immediate actions

  • Rotate all secrets, tokens, and API keys immediately upon discovering any accidentally committed credentials in version control history.
  • Audit all GitHub Actions workflows and recent repository activity for unauthorized modifications or suspicious exfiltration steps.
  • Enable GitHub's secret scanning and push protection features to block and alert on committed credentials in real time.

Long-term improvements

  • Enforce mandatory code review and multi-party approval for all CI/CD pipeline changes, including GitHub Actions workflow files.
  • Implement least-privilege access controls for GitHub organization members and service accounts, restricting who can approve and publish releases.
  • Store all secrets in a dedicated secrets manager (e.g., HashiCorp Vault, AWS Secrets Manager) and never hardcode credentials in source code or configuration files.

Detection measures

  • Deploy continuous monitoring and alerting on repository events such as new workflow file additions, permission changes, and artifact publication.
  • Integrate Software Composition Analysis (SCA) and artifact integrity verification (e.g., sigstore/cosign) into the software supply chain to detect tampered packages before deployment.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.