The LiteLLM 1.107.0 release on PyPI contained a credential stealer and a backdoor, according to SafeDep’s October 21 analysis. The malicious code targeted credentials used by AI infrastructure, including provider API keys stored in a LiteLLM proxy database. Python startup could trigger it even when an application never imported LiteLLM.
This was a compromised software dependency. The reported attack ran through the package and its release process, rather than a vulnerability in an underlying model. Switching which model a proxy calls would leave that package compromise unresolved.
What the release exposed
SafeDep found three planted files in all seven published wheels for Linux, macOS and Windows. A cook.pth file imports the stealer in cook.py at Python startup. The third file, sitecustomize.py, starts a background process that can fetch and execute further code.
The stealer reads DATABASE_URL and targets two LiteLLM proxy tables that hold provider API keys. Its other targets include cloud credentials, SSH keys, AI development tool tokens and process environment variables. It encrypts collected data and uploads it to www.litellm[.]dev.
SafeDep says the backdoor checks a GitHub file every hour for a server address, reruns the stealer and downloads code to execute. The GitHub account returned 404 by 13:40 UTC on October 21. SafeDep could not recover the server address, so what any earlier second-stage download did remains an open question.
Which artifacts were affected
PyPI removed 1.107.0 by 13:23 UTC on October 21, SafeDep reports. Docker images tagged v1.107.0, latest, main-latest and main-stable on Docker Hub and GHCR also carried the code between 11:46 and 14:20 UTC that day.
SafeDep identifies 1.106.2, 1.107.0rc1 and 1.107.0rc2 as clean. It also identifies the pinned companion packages litellm-proxy-extras==0.4.110 and litellm-enterprise==0.1.78 as clean.
The upstream GitHub source lacked the planted files. Citing LiteLLM’s incident report, SafeDep says an attacker used stolen developer credentials to redirect a private release workflow to a lookalike repository. The official pipeline then built, signed and published the artifacts.
Sources
- SafeDep: Compromised LiteLLM 1.107.0 on PyPI Installs a Credential Stealer and Backdoor
- Lead image: LiteLLM’s primary logo from its official brand kit.





