If you installed litellm==1.107.0 between roughly 11:39 and 13:40 UTC on October 21, 2026, stop what you are doing and treat that machine as fully compromised. Security firm SafeDep confirmed that all eight distribution files for that version — seven binary wheels plus the source tarball — contained two malicious implants that activate on every Python process startup, not just when your code imports litellm. PyPI has removed the release. Versions 1.106.2, 1.107.0rc1, and 1.107.0rc2 are clean.
What the attack actually does
Installing the package drops three extra files into your Python environment's site-packages directory: cook.pth, cook.py, and sitecustomize.py. Python's .pth mechanism causes cook.pth to import cook.py automatically at interpreter startup — meaning the stealer runs inside pip, your IDE's language server, your CI runner, and every other Python process on the host, not just your application. The sitecustomize.py file launches a background daemon that checks an attacker-controlled GitHub file every hour for a server address, re-runs the stealer, and fetches and executes arbitrary code from that server. The attacker can change the target server at any time by editing a single text file.
The scope of what gets exfiltrated

cook.py is a 61 KB obfuscated Python script that collects an unusually broad range of credentials: SSH private keys, AWS/Azure/GCP/Kubernetes credentials, browser saved passwords (including Chromium's DPAPI-encrypted vault and Firefox's key database), shell history, CI/CD secrets from GitLab runners and Jenkins, Terraform and Vault tokens, TLS private keys, GPG keys, and — critically for LiteLLM users — the contents of the LiteLLM proxy's credentials database, which stores all configured LLM provider API keys. It also reads environment variables from other running processes via /proc on Linux. All collected data is encrypted with AES-256-CBC and RSA-OAEP before being POSTed to www.litellm[.]dev/healthcheck. A marker file at /tmp/.pconce72129118c59f5636c0bb prevents duplicate uploads, but the hourly backdoor daemon bypasses this check.
How a malicious build got into a legitimate release
The upstream GitHub repository contains no trace of the malicious code. SafeDep's analysis shows the attacker modified the pyproject.toml in the source distribution to include a maturin build directive (data = "cook") that copies a cook/ folder into the wheel's purelib section, which pip then installs into site-packages. The malicious wheels match the output of BerriAI's normal release pipeline in every structural detail — same build tool (maturin 1.9.4), correct RECORD file entries, proper CRLF/LF line endings per platform, and the usual bot-published GitHub release appearing roughly 10 minutes after the PyPI upload. No public GitHub Actions run accounts for this build. SafeDep's assessment, at moderate-to-high confidence, is that the attacker modified the source fed to BerriAI's private build pipeline, likely via a compromised maintainer or bot credential, rather than uploading from their own machines with a stolen PyPI token.
What to do right now
First, check whether the package was installed: look for cook.pth, cook.py, or sitecustomize.py in any Python environment's site-packages directory. Check /tmp/.pconce72129118c59f5636c0bb (Linux/macOS) and /tmp/remotecodeloader.lock — their presence means the implants ran. Verify using the SHA-256 hashes published by SafeDep above. If you find evidence of infection, rotate every credential that was accessible to any Python process on that host: SSH keys, cloud IAM credentials, LLM provider API keys, CI/CD tokens, and any secrets in environment variables. Because the backdoor daemon may have executed second-stage payloads before the attacker's GitHub account was deleted at 13:40 UTC, you cannot assume the damage is limited to what the stealer collected. The full network indicators and file hashes are listed in the SafeDep report at safedep.io.
