LiteLLM supply chain attack: what to do if you installed 1.107.0
On 21 October 2026 a malicious LiteLLM release stole cloud and AI credentials. Find out if you are affected, clean the host and rotate the right keys.
LiteLLM is a popular gateway between applications and model providers like OpenAI, Anthropic and Google. On 21 October 2026, attackers published a malicious LiteLLM release, version 1.107.0, to PyPI and Docker Hub. It stole cloud credentials and AI API keys from every machine that installed it. If your team runs LiteLLM, check your systems today.
Which versions and images are affected
The LiteLLM incident report lists these compromised artifacts:
| Channel | Affected | Window on 21 October (UTC) |
|---|---|---|
| PyPI | litellm==1.107.0, all seven wheels |
11:39 to 13:23 |
| Docker Hub | tags v1.107.0, latest, main-latest, main-stable |
11:46 to 14:20 |
| GHCR | the same four tags | 11:46 to 13:51 |
According to LiteLLM, all earlier versions are safe. The official v1.107.0 source tag on GitHub
doesn’t contain the malicious files, and enterprise customers on the private registry weren’t
affected.
You’re at risk if an install or container start during that window used an unpinned version or
one of these tags. CI pipelines and containers that pull latest are the most exposed.
What the malware does
Datadog Security Labs
analysed the release. It drops three files into site-packages: cook.pth, cook.py and
sitecustomize.py. Python runs .pth files and sitecustomize.py every time an interpreter
starts, so every Python process in that environment runs the malware, even if it never imports
LiteLLM.
Among other things, the credential stealer collects:
- AWS, GCP and Azure credentials, including those from instance metadata.
- Kubernetes, Docker, Vault and Terraform secrets.
- SSH keys, Git, npm and PyPI tokens,
.envfiles and shell history. - LLM provider API keys and sessions of developer AI tools such as Claude, Codex and Cursor.
- The upstream provider credentials stored in the LiteLLM proxy database, if there is one.
A second file is a backdoor. Every hour, it asks a remote address for code to download and run.
Datadog hadn’t seen a second-stage payload at the time of its analysis. Deleting the litellm
package directory doesn’t remove the three files.
The attacker moved fast. Help Net Security cites research from Wiz: about four and a half hours after the theft, the attacker was testing AWS credentials taken from compromised CI runners and Kubernetes nodes, and checking access to Amazon Bedrock.
How the attackers got in
The attack chain report traces it all back to one key. On 27 May 2026, an admin key for an internal LiteLLM platform was committed to a public repository. Nobody revoked it, and four months later it still worked. With it, the attacker obtained a GitHub token belonging to an organisation owner, collected more tokens from there, and pointed the release pipeline at a lookalike repository.
This is LiteLLM’s second supply chain compromise of 2026. Datadog links an earlier incident in March, involving versions 1.82.7 and 1.82.8, to the TeamPCP campaign. When it published its report, Datadog had found no connection between the two attacks.
What to do now
These are LiteLLM’s steps. Follow them in this order.
- Don’t start with
pip install. Every Python start in an affected environment runs the malware again, and that includes pip. - Look for evidence. Search for
litellm-1.107.0.dist-info,cook.pthandsitecustomize.py, and for containers that ran the image digestsha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e. Finding nothing doesn’t prove a host is clean. - Remove the files from the shell. Delete
cook.pth,cook.py,sitecustomize.pyand their.pycfiles from every affectedsite-packages, and stop the Python daemon holding/tmp/remote_code_loader.lock. - Rebuild. Build fresh images and virtual environments from scratch, and pin
litellm==1.106.2or another explicit earlier version. - Assume the theft succeeded on every host with outbound internet access.
- Rotate from a clean machine. That means the host’s IAM role, every provider key in the LiteLLM proxy database, the master and virtual keys, the database password and every secret in the host’s environment.
- Go through your cloud logs. In AWS CloudTrail, look for
GetCallerIdentitycalls around the install time, then for use of those credentials from outside your infrastructure.
And for the longer term:
- Pin exact versions and image digests in production and CI. Don’t deploy
latest. - Give the gateway its own provider keys with low spend limits, so a stolen key costs less.
- Scan your public repositories for secrets and revoke any key that leaks. This whole attack started with a key nobody revoked.
How we approach this
An LLM gateway holds the keys to every model provider you use, which makes it a valuable target. In one project we built a private AI workspace with specialised agents, with an API layer between the agents and the model providers that logs usage and caches answers. We treat a layer like that as critical infrastructure and run it through the checklist above.
Sources
- Contained: Oct 21, 2026 LiteLLM release v1.107.0 Compromised, LiteLLM, 21 October 2026
- The attack chain behind the v1.107.0 LiteLLM release, LiteLLM, 23 October 2026
- LiteLLM supply chain compromise: What you need to know, Datadog Security Labs, 21 October 2026
- LiteLLM hit by second supply chain attack this year, users urged to rotate credentials, Help Net Security, 22 October 2026