On Oct 21, litellm==1.107.0 on PyPI (all seven wheels, 17:09β18:53 IST) and the Docker tags v1.107.0, latest, main-latest and main-stable (17:16β19:50 IST) contained two extra files, cook.pth and sitecustomize.py. Both run whenever Python starts on the host, even in processes that never import litellm, pip included. The first steals SSH keys, AWS/GCP/Azure credentials, kubeconfig, the Kubernetes service-account token, instance-metadata role credentials, AI-tool tokens and the provider API keys stored in the LiteLLM proxy database. The second is an hourly loader that downloads and runs remote code. LiteLLM's preliminary account of the chain: an internal LiteLLM deployment exposed to the internet held GitHub CLI OAuth tokens in its logged response bodies. The attacker used an org-owner token to override branch protection and force-push a release-workflow change that built from a lookalike repo, Berri-AI/litellm. A second developer's token approved the production gate, and a third deleted the workflow run records. Trusted Publishing and image signing didn't stop it, because the real pipeline signed and published the poisoned artifacts. Versions 1.106.2, 1.107.0rc1 and rc2 are clean.
DATABASE_URL password and any secret the host could reach. Then check CloudTrail for GetCallerIdentity calls. Lessons for any Go or Kubernetes platform: pin images by digest rather than latest, treat gateway and proxy logs as places where secrets end up, and scope org-owner tokens tightly. Links: GitHub issue #47826 Β· SafeDep analysis.