LiteLLM Traces Its Poisoned 1.107.0 Release to a Master Key Nobody Revoked

LiteLLM says a master key exposed in a public repository in May, and never revoked, let an attacker take a GitHub owner token and push a credential-stealing 1.107.0 release on Wednesday. Microsoft warns that removing the package alone won't clean an affected Python environment.
Abstract illustration of a software release pipeline: glowing blue stage blocks turn amber after a side branch routes through a lookalike block, with a gold key outline above
LiteLLM Traces Its Poisoned 1.107.0 Release to a Master Key Nobody Revoked
At a Glance
  • Incident: Poisoned litellm 1.107.0 online about two hours
  • Root cause: Master key flagged in May was never revoked
  • Access: Attacker got a GitHub org owner’s CLI token Oct. 10
  • Advice: Users told to rotate every reachable credential

Anyone who installed litellm 1.107.0 during its roughly two hours online Wednesday has been told to rotate every credential the affected machine could reach. LiteLLM has now explained how its own release pipeline built and shipped that poisoned version, and the trail starts with a master key the company meant to revoke back in May.

In a root-cause analysis posted Friday, Director of Security Oliver Jensen and AI engineer Mateo Wang wrote that a configuration file committed to the public LiteLLM-Labs/lite-harness repository on May 27 held the master key for the company’s experimental Agent Platform. The commit was force-pushed over and the key was flagged for revocation. Nobody revoked it.

On Oct. 10, an attacker used it against the platform’s API and got back a GitHub CLI token belonging to one of LiteLLM’s two GitHub organization owners. That token wasn’t tied to a service account or scoped down. Less than an hour later, workflows on throwaway branches posted repository secrets to a webhook.site address, handing over tokens for two more maintainers.

Socket, which found those workflows independently, said in its report that a second run on Oct. 12 took 14 more secrets, among them a GitGuardian API key and an AWS Bedrock token. Those branches lived for minutes and left almost nothing in the repository’s history.

The release rule had just been loosened

A LiteLLM release normally has to be started by an authorized engineer and approved by an account locked to a physical device in the company’s office. That rule had been loosened earlier in the week so any two engineers could trigger and approve a release, to speed up backports. On Wednesday the attacker overrode branch protection with the owner’s token, pointed the release workflow at a lookalike repository called Berri-AI/litellm, and approved the production run with a second maintainer’s stolen token.

It was the second time this year that poisoned LiteLLM versions reached PyPI. In March, versions 1.82.7 and 1.82.8 were live with a credential stealer for about 40 minutes, a compromise the company said it believed began with the Trivy dependency in its CI/CD scanning workflow. “This incident has provided a strong illustration of the risks associated with failing to rotate a potentially exposed key,” Jensen and Wang wrote this time.

Uninstalling the package doesn’t clean it up

Installing the bad wheels put cook.pth, cook.py and sitecustomize.py outside the litellm folder, so the stealer could run whenever Python started, even in projects that never imported LiteLLM, Microsoft’s security team said in a technical breakdown. Its advice is that investigators “should not start Python or pip inside a suspect environment to determine whether the malicious package is present,” and that teams rebuild affected environments and rotate credentials from a clean machine.

LiteLLM credited researcher Lidor Machluf with catching the release within 20 minutes of publication. The project, which also had two unrelated gateway flaws disclosed by Check Point Research earlier this month, says it will spell out its process changes next week.

Subscribe for Updates

DevSecurityPro Newsletter

The DevSecurityPro Email Newsletter is essential for DevSecOps leaders, DevOps directors, application developers, and security engineers. Perfect for professionals focused on embedding security into the development pipeline and protecting applications at scale.

By signing up for our newsletter you agree to receive content related to ientry.com / webpronews.com and our affiliate partners. For additional information refer to our terms of service.

Notice an error?

Help us improve our content by reporting any issues you find.

Get the WebProNews newsletter delivered to your inbox

Get the free daily newsletter read by decision makers

Subscribe
Advertise with Us

Ready to get started?

Get our media kit

Advertise with Us