Blog
Poisoned LiteLLM 1.107.0: working out what it read on your machines
The story: Contained: Oct 21, 2026 LiteLLM release v1.107.0 Compromised · LiteLLM (BerriAI) ·
Topics: AI tools Breaches and leaks
On 21 October 2026 attackers used stolen developer tokens to publish LiteLLM 1.107.0 with a credential stealer that runs whenever Python starts. Which machines are affected, what the stealer looks for, and why the hard question afterwards is what it actually read.
On 21 October 2026 someone used stolen developer tokens to publish a poisoned version of LiteLLM, a widely used Python library for calling AI models, to PyPI and as Docker images. Version 1.107.0 carried a credential stealer that runs whenever Python starts. It was on PyPI for under two hours and in Docker images for about two and a half, and for the teams that picked it up, the hardest question is what it read on each machine.
What happened
LiteLLM, made by BerriAI, gives programs one interface to many AI model providers, as a library or as a proxy server. It is downloaded about 23 million times a week, according to The Register and Datadog Security Labs.
BerriAI's post-mortem, last updated at 20:30 UTC on 21 October, gives the sequence. At 10:08 UTC a credential tied to a privileged developer account overrode branch protection on the release workflow. At 10:46 the changed workflow began building from a lookalike repository, Berri-AI/litellm, "differing by one hyphen from the legitimate BerriAI/litellm project", as Socket put it. Seven malicious wheels reached PyPI at 11:39, and container images followed at 11:46 under the tags v1.107.0, latest, main-latest and main-stable. At 11:53 a third developer's credentials deleted the release workflow's records, which BerriAI says limits the logs it has. PyPI removed the release at 13:23, and by 14:20 the last affected Docker Hub tags had been removed or pointed back at clean images.
BerriAI says the attacker held three developers' GitHub CLI credentials, one of them an organization owner's, and used release permissions that had been widened that week so engineers could publish bugfix backports. It suspects the tokens were taken from the logs of an internal LiteLLM deployment reachable from the internet, but says it has not confirmed how the attacker got in. By its account, earlier versions are safe, the official v1.107.0 source tag doesn't contain the malicious files, and its private enterprise registry was not affected. Researchers at Upwind reported the wheels in GitHub issue #47826. LiteLLM was also compromised in March 2026, in versions 1.82.7 and 1.82.8; Datadog says no connection between the two has been established.
The wheels add three files to Python's site-packages. cook.pth holds one line, import cook, which Python runs every time it starts, so nothing has to import LiteLLM. cook.py collects. sitecustomize.py starts a background process that checks every hour for new code to run; StepSecurity found that this part fails on Windows, while the collector still runs there.
According to StepSecurity's analysis, the collector reads every file in ~/.ssh, GPG and TLS private keys, AWS, Azure and Google Cloud credential files, ~/.kube/config, Docker and GitHub CLI configuration, .git-credentials, .npmrc and .pypirc, .env files up to two levels below the home and working directories, browsers' saved logins and cookies, shell histories, and the sign-in and configuration files of AI coding tools such as Claude Code, Cursor, Codex and Gemini CLI. It also takes environment variables, including those of other processes on Linux, and, where DATABASE_URL is set, the provider keys stored in a LiteLLM proxy's database. The results are encrypted and posted to litellm.dev, which is not the project's domain.
What it means
Almost everything that collector does is ordinary file reading: a Python process opening a folder of keys, a project's .env, a browser profile. Infostealers had already started going after AI tools' sign-in files, as we wrote about Aoki. The difference here is the way in: the stealer arrived as the latest release of a library, through the same pip install or image pull teams run every day.
The advice from BerriAI and the researchers is blunt. If 1.107.0 ran on a host with outbound internet access, assume its secrets left, and rotate everything that host could reach. A marker file, /tmp/.pc_once_72129118c59f5636c0bb, is written after a successful upload, but BerriAI notes that its absence proves nothing.
Rotation answers the urgent question. It doesn't answer the ones that follow: which customers' keys were on that build server, which projects' .env files sat within reach of the working directory, whether a developer's browser profile was on the machine at all. What was taken depends on what each machine held, and on most machines nothing kept a record of which files a process opened. The attacker deleting the workflow records is a reminder of how quickly the evidence for the other half of an incident can go too.
Two details widen the circle. The payload runs on any Python start, so a CI job that installed the release and then only ran tests was as exposed as a proxy server. And pip is itself a Python program: in an affected environment it starts the collector again, which is why BerriAI and StepSecurity both say not to begin the clean-up with pip.
What you can do
Find every place 1.107.0 landed: laptops, CI runners, containers, and the internal mirrors and pull-through caches StepSecurity says to purge. Check from the shell, without starting Python. A match confirms exposure; no match doesn't prove a machine is clean, BerriAI says.
find / \( -name 'litellm-1.107.0.dist-info' -o -name 'cook.pth' \) 2>/dev/null
Check containers. BerriAI says any container that ran the image index sha256:1bbcb1443bc962e45f5aad53fe3d2c30600e0379715fb6c664cdd3ac126c339e between 11:46 and 14:20 UTC should be treated as compromised.
Search DNS and proxy logs for litellm.dev, and for requests to /codepy, which StepSecurity says means the attacker's second-stage code ran.
Clean up in BerriAI's order on an affected host: delete cook.pth, cook.py, sitecustomize.py and their __pycache__ copies, stop the process holding /tmp/remote_code_loader.lock, then rebuild the environment or image with litellm==1.106.2.
Rotate every credential the host could reach, including cloud roles, SSH and GPG keys, registry and CI tokens, AI tools' tokens and, on a proxy, its provider keys and database password. BerriAI suggests checking CloudTrail for GetCallerIdentity calls from the instance role around the time of the install.
For next time, record reads of the folders that hold keys. On Linux, the audit system can log every read in a folder from the moment a rule is added. Its manual warns that folder watches slow the system, so keep them narrow; ausearch reads them back:
auditctl -a always,exit -F arch=b64 -F dir=/etc/ssl/private/ -F perm=r -k tls-keys
ausearch -k tls-keys -i
That covers one folder on one machine, from today, for as long as the audit log keeps it. Doing the same for every developer's home folder across a fleet is where it gets hard.
Where ProofStream fits
ProofStream records which program opened which folder on each Mac, Windows and Linux machine, and keeps that history searchable for months. On machines running it, the console would show whether a Python process opened ~/.ssh, the cloud credential folders, browser profiles or project folders after 11:39 UTC on 21 October, and on which machines; file names only in folders a customer has chosen, on Business Plus. It wouldn't have stopped the stealer, and it doesn't see environment variables, a database, what was sent or the network, so rotating credentials still comes first. How it works.
Sources
- Contained: Oct 21, 2026 LiteLLM release v1.107.0 Compromised
- GitHub: BerriAI/litellm issue #47826, litellm 1.107.0 compromised (Upwind report)
- Socket: LiteLLM PyPI package and Docker images compromised to steal cloud and AI credentials
- StepSecurity: litellm 1.107.0 compromised on PyPI, backdoored wheels drop a credential stealer
- Datadog Security Labs: LiteLLM compromised on PyPI and Docker
- The Register: LiteLLM supply chain attack hoovers up passwords and secrets
- man7.org: auditctl(8), Linux manual page
- man7.org: ausearch(8), Linux manual page
Spotted a mistake? Tell us and we'll correct it.
Comments
No comments yet.