What happened

On 21 October 2026, the LiteLLM 1.107.0 release on PyPI shipped with a credential stealer and a remote-code-execution backdoor. All seven wheels (Linux, macOS, Windows) installed three extra files into site-packages, and two of them run every time any Python process starts on the host - even one that never imports litellm. The upstream GitHub source does not contain the malicious code. PyPI removed the release at 13:23 UTC the same day; Docker images tagged v1.107.0, latest, main-latest and main-stable also carried it between 11:46 and 14:20 UTC.

Versions 1.106.2, 1.107.0rc1 and 1.107.0rc2 are clean, and so are the pinned companion packages litellm-proxy-extras==0.4.110 and litellm-enterprise==0.1.78.

Timeline (all UTC, 21 Oct 2026, from LiteLLM's incident report via SafeDep)

How the attacker got it signed and shipped

According to LiteLLM's incident report, the attacker held GitHub CLI credentials of three developers, believed taken from the logs of an internal LiteLLM deployment exposed to the internet. With an organization owner's token, the attacker bypassed branch protection, pointed the private release workflow at a lookalike repository (Berri-AI/litellm, note the dash), passed the approval gate with a second developer's credential, and let the official pipeline build, sign and publish the artifacts. The only visible source change: one added line in pyproject.toml, data = "cook", which copies the payload folder into every wheel.

What the implant does

Payload 1 - cook.pth / cook.py, a credential stealer. Python runs any import line in a .pth file at every interpreter startup, so the stealer fires in every Python process: the app, pip, IDE language servers, CI jobs. It collects SSH keys, AWS/Azure/GCloud credentials, Kubernetes and Docker configs, CI/CD secrets (GitLab runner, Jenkins, Terraform), browser saved passwords and history, AI tool tokens (Claude Code/Desktop, Cursor, Windsurf, Copilot, Gemini CLI, Codex, Aider, Hugging Face and others), environment variables of its own and other processes, GPG and TLS private keys, AWS instance metadata credentials, and - notably - the LLM provider API keys stored in a LiteLLM proxy database. It encrypts everything and POSTs it to www.litellm[.]dev.

Payload 2 - sitecustomize.py, a backdoor daemon. Also auto-imported at every Python startup. Once an hour it reads a server address from a file in the attacker's GitHub repo, runs the stealer again, and downloads and exec()s whatever code that server returns. The attacker could retarget all infected hosts by editing one file. The repo was deleted about two hours after release, so the backdoor now finds no address and idles - but hosts that ran it earlier could have received second-stage code.

How to check an environment (from SafeDep's indicator list)