LiteLLM 1.107.0: a poisoned release that runs on any Python start
Attackers published a malicious 1.107.0 to PyPI and to the official container registries. It drops cook.pth, cook.py and sitecustomize.py into site-packages, so Python own startup runs the payload whether or not you import LiteLLM. The collector targets Git credentials, npm config, .env files, cloud credentials and instance metadata, Kubernetes service-account tokens, SSH keys, Vault and CI config, browser stores, other processes environments, and selected credential rows from the proxy database.
- Affected
litellm==1.107.0 on PyPI, all seven wheels, live 11:39 to 13:23 UTC. Docker Hub and GHCR tags v1.107.0, latest, main-latest and main-stable until 14:20 UTC. The 1.107.0 source tag on GitHub is clean: the malicious artifacts were built from an attacker-controlled lookalike repo.- Fixed
- There is no fixed 1.107.0. Pin 1.106.2 or an earlier explicit version, or a later release. LiteLLM re-signed from 1.103.8, 1.104.6, 1.105.4 and 1.106.3 on 24 October with a new signing key.
- Do this
- Do not start Python or pip in a suspect environment, because that re-runs the payload. From a clean machine, delete
cook.pth, cook.py, sitecustomize.py and matching __pycache__ files from every site-packages, kill the detached loader process, then rebuild from pinned artifacts. Rotate everything the host could reach: instance IAM role, every provider key in the proxy database plus master and virtual keys, the database URL, and anything in a process environment. Check CloudTrail for GetCallerIdentity from the instance role around install time. - Exploited
- This is a supply-chain compromise rather than an exploited vulnerability. The package was public for about two hours, and no confirmed victim has been reported. Say compromised and pulled, not thousands affected.
LiteLLM incident post →Microsoft technical analysis →