LiteLLM Supply Chain Attack Delivers Info-Stealer Through PyPI and Docker
Hackers compromise the release pipeline of LiteLLM, a widely used open-source Python SDK and AI gateway with 92 million monthly PyPI downloads, and publish a malicious version 1.107.0 containing credential-stealing malware. The supply-chain attack affects all seven PyPI wheels for the version, impacting Windows, Linux, and macOS systems, along with compromised Docker images on Docker Hub and GitHub Container Registry. Enterprise customers using the private deployment remain unaffected, according to the project maintainers.
The compromised packages remain live for several hours on October 21 — the PyPI wheels from 11:39 to 13:23 UTC and Docker images from roughly 11:46 to 14:20 UTC. Rather than modifying the LiteLLM application code, the attacker injects three malicious files (cook.pth, cook.py, and sitecustomize.py) into the Python library directory. Researchers from Socket and Endor Labs explain that these files execute automatically whenever Python or pip launches in the environment, running the payload before the application itself.
Security companies detect the attack within six minutes of publication and analyze the payload, which steals credentials, secrets, and environment variables while also loading remote-code execution tools. The incident highlights the growing risk of supply-chain attacks against popular open-source AI tooling, as LiteLLM is used by major companies including NVIDIA, Netflix, AT&T, and Okta. Teams that installed the affected version during the exposure window are urged to rotate credentials and audit their environments.