UK — The Register
LiteLLM supply chain attack started with an exposed master key
Security1 min read
LiteLLM, an open source tool that routes requests to AI models, was hit by a supply chain attack. The attack began with a master key that was accidentally posted on a public GitHub page and never replaced.
What happened
Someone uploaded a poisoned version (1.107.0) of LiteLLM to PyPI and its container registries. This version held malware that steals passwords and secret keys and can run any code on an infected computer. It was online for less than two hours before it was pulled, but it was downloaded about 49,000 times.
Key facts
- The bad version was 1.107.0, and it was available for less than two hours.
- About 49,000 downloads happened during that time, according to Wiz.
- The master key was posted to a public GitHub repository on May 27.
- The attacker used the key on October 10 to get into LiteLLM's internal platform.
How the attack spread
A configuration file with a master key was posted to a public GitHub repository. The team removed the file quickly but did not cancel the key. The attacker then used that key to get a GitHub login token. This token gave them owner-level access to all of LiteLLM's GitHub repositories. From there, they stole more login tokens from two engineers and from other internal systems.
Why it matters
The attacker could make changes that looked like they came from trusted engineers, so the changes did not raise suspicion. The malware also targeted many kinds of secrets, including cloud logins, browser cookies, and API keys for AI companies such as OpenAI and Anthropic. The lesson is clear: when a key is exposed, it must be replaced right away.
What to do now
- If you installed version 1.107.0, assume any credentials on that system may have been stolen.
- Check affected systems and look for signs of misuse.
- Change passwords and replace all exposed keys and tokens.
- Watch for LiteLLM's further updates on the investigation.
Glossary
- LiteLLM
- An open source tool that helps software send requests to many AI models through one system.
- PyPI
- A public library where Python programmers download free software packages.
- GitHub
- A website where developers store, share, and work on code together.