LiteLLM's poisoned release began with a key leaked in May

A master key exposed in May and never revoked gave an attacker a GitHub owner's token, and 11 days later LiteLLM 1.107.0 shipped a credential stealer.

Listen to this story
5:38

On October 21 someone pushed a poisoned release of LiteLLM, the open-source library and proxy that lets one piece of code call many model providers. Version 1.107.0 was live on PyPI from 11:39 to 13:23 UTC, and the Docker images tagged v1.107.0, latest, main-latest and main-stable carried it until as late as 14:20. LiteLLM's own release pipeline built it, so it carried LiteLLM's real signature. A signature check that passes on that version tells you nothing.

What the malware does is the reason to check. Analysts at SafeDep and JFrog report that all seven wheels, the ready-to-install packages, drop cook.pth, cook.py and sitecustomize.py into site-packages, the folder where Python keeps installed code. Python loads them every time it starts, so they run even in programs that never import LiteLLM. One collects SSH keys, cloud and CI credentials, AI tool tokens, browser passwords and the provider keys in a LiteLLM proxy database. The other checks in every hour for more code to run, though that part cannot finish on Windows.

The break-in started in May. LiteLLM's account says that on May 27 a config file in a public repository held the master key to its Agent Platform, an experimental service where agents opened pull requests. The file was deleted, but the commit stayed in the public history until October 22, and nobody revoked the key. On October 10 the attacker used it to pull the platform's settings, which included the GitHub token its agents used: an organization owner's, not a narrow service account's.

An owner can change almost anything. Eleven days later the attacker pointed the release pipeline at their own copy of the code, started the build with one maintainer's stolen token and approved it with another's. LiteLLM had relaxed, that week, its rule that releases be approved from one account locked to a device in its office.

That touches Jon's work twice. LiteLLM sits where many firms keep every model key they own, and he builds AI systems for firms. And the failure was an agent service holding a person's full GitHub token, the shape of any fleet of coding agents. His agents checked their own machine the next morning: none of its 12 Python environments has LiteLLM, and none holds the three files.

What LiteLLM is changing

On October 30 LiteLLM published its repair list: 25 promises, each with a date, the last due January 31. Why signing saved nobody, in its words: "no pipeline controls can defend against an attacker who is an organization owner, because the owner owns the pipeline." So the repairs are about accounts, and any team running coding agents can copy them:

  • Owner accounts are separate from the accounts people work in, and can't be used through a token, an app or the command line. Done.
  • No automation signs in as a person. Each gets a GitHub App or a narrow token that expires.
  • A leaked key opens a ticket that closes only when the key is revoked.
  • Releases are approved only from one account tied to a device in the office. Done.

LiteLLM is not banning the tools: "We are not going to tell engineers to stop using Claude Code and similar tools. Instead we size the account to the risk." It treats everything on a developer's machine as readable by the agents running there.

The cheapest repair to copy today: list every place an agent or a script signs in as you, and give each its own narrow token.

Check your own machines

  • Check every environment: find / -name cook.pth -path "*-packages*" 2>/dev/null, pip show litellm in each virtualenv, and docker images | grep litellm. Run them from outside a suspect environment, since any Python started there runs the hooks again.
  • If 1.107.0 or those tags ran in the window, assume the theft worked: rebuild and rotate everything the host could reach.

For anyone running the LiteLLM proxy

  • Check your signing key. LiteLLM replaced it on October 23, and its incident page now carries the new key's fingerprint. Trust the old key only on images published before October 21.
  • Pin exact versions, and Docker images by digest: latest is how the poison spread. LiteLLM is trying a long-term support line, 1.108, and has paused patches to its four most recent stable lines meanwhile, so check that your line still gets fixes.
  • With an Enterprise license, upgrade to 1.106.5, 1.105.6, 1.104.8 or 1.103.10. A separate hole let an unauthenticated request make the proxy send out its own keys. Paying customers got that fix three weeks early, and a private registry is to do the same for the most severe fixes. So without a license, keep the proxy off the public internet: a fix can exist before you can see it.

Sources

Comments

No comments yet.

Sign in to comment. You'll come back to this story.