For the second time in seven months, the open-source project LiteLLM fell victim to a supply-chain attack. On October 21, 2026, unknown attackers compromised the release pipeline of the Python SDK and AI gateway, which allows applications to access AI models from various providers via a common interface. The project has 61,800 GitHub stars and 92 million monthly downloads on PyPI. The attackers published the tampered version 1.107.0 on PyPI and in the Docker registry. It contained malware that steals credentials and downloads tools for remote code execution.
The package was available on PyPI from 11:39 to 13:23 UTC, and the Docker images from 11:46 to 14:20 UTC. According to Wiz, approximately 49,000 users downloaded the version. The malware created three files (cook.pth, cook.py, and sitecustomize.py) and ran every time Python was launched. It stole cloud credentials, AI keys, provider keys stored in the LiteLLM proxy database, SSH, GPG, and TLS keys, browser data, and environment variables. A backdoor for Linux and macOS checked GitHub hourly to download additional code.
According to LiteLLM, the cause was GitHub CLI OAuth tokens from the logs of an internal instance that was publicly accessible on the internet. Anthropic’s coding agent, Claude Code, reportedly sometimes outputs the token in a response. LiteLLM did not explain how the attacker gained access to the instance but suspects a recently patched vulnerability. Using the credentials of three developers, the attacker disabled branch protection, released the build from a lookalike repository, and deleted the workflow logs.
Upwind was the first to report the issue on GitHub. According to LiteLLM, it learned of the incident at 6:32 a.m. Pacific Time, just under two hours after the release. Wiz observed tests using the stolen AWS credentials approximately four and a half hours after the theft. LiteLLM withdrew the packages and recommended upgrading to version 1.106.2 and replacing all accessible secrets. Enterprise customers of the private registry were not affected.
Back in March 2026, the hacker group TeamPCP had already distributed two tampered LiteLLM versions via PyPI. At that time, the attackers had infiltrated the software supply chain via the compromised security scanner Trivy. A connection between the two attacks has not yet been proven.
More on the first LiteLLM supply chain attack in March 2026.