TL;DR: SafeDep has disclosed the compromise of LiteLLM 1.107.0 — a release of the most popular LLM proxy on PyPI shipped a credential stealer and an RCE backdoor in all 7 wheel packages (Linux, macOS, Windows). Three implant files in site-packages executed on every Python startup on the host — pip, IDE language servers, CI jobs — even if litellm itself was never imported. The stealer harvested SSH keys, cloud credentials, CI/CD secrets, and AI tool tokens (Claude Code, Cursor, Copilot, mcp.json, and a dozen more). PyPI pulled the release roughly 2 hours later — 13:40 UTC on 2026-10-21. Clean versions: 1.106.2, 1.107.0rc1/rc2; the sibling packages litellm-proxy-extras 0.4.110 and litellm-enterprise 0.1.78 were not affected. Discussion on HN.
What happened
On October 21, 2026, at 11:39–11:40 UTC, the wheels for LiteLLM 1.107.0 were uploaded to PyPI. Every one of the seven contained three files that had no business being in the package. At 13:40 UTC the release was pulled from PyPI and the attacker’s GitHub account was deleted. The infection window was about two hours — but for a package of this scale that’s plenty: LiteLLM gets installed into CI pipelines, proxy containers, and developer machines in bulk.
If you installed or upgraded litellm that day, skip ahead to “What to check on your machines” below.
The three implant files

Everything malicious lives in site-packages and comes in three parts:
- cook.pth — a single line,
import cook. Python executes.pthfiles at interpreter startup, so this import fires on every launch of any Python process on the host. - cook.py — 61 KB of obfuscated code: the credential stealer itself.
- sitecustomize.py — a module Python also auto-loads at startup; this one hosts the backdoor daemon.
The key point: importing litellm is not required at all. The package merely being installed is enough. Every pip install, every linter run in your IDE, every CI job on an infected host launches the stealer and the backdoor.
What the stealer collects

The target list reads like a map of “where a developer keeps the keys to everything”:
- SSH keys and configs.
- Cloud credentials:
~/.aws, Azure, gcloud, kubeconfig, docker config,ghhosts.yml,rclone.conf,.netrc. - CI/CD secrets: GitLab runner, Jenkins, vault-token, Terraform.
- AI tool tokens: Claude Code and Claude Desktop, Cursor, Windsurf, Copilot,
mcp.jsonin VS Code, Gemini CLI, Codex auth.json, Continue, Aider, Goose, opencode, Qwen, Crush, Kiro, Zed, Hugging Face. - Browsers: saved passwords and history.
- Environment variables — including reading
/proc/<pid>/environof other processes. - The LiteLLM proxy database: the
LiteLLM_CredentialsTable— the LLM provider keys of everyone using the proxy. - AWS instance metadata: IMDSv2 requests with a fallback to v1.
- GPG and TLS keys.
Worth singling out the LiteLLM_CredentialsTable item. LiteLLM often runs as a team’s central proxy for OpenAI, Anthropic, and the rest — its database is a concentrated stash of provider keys. Steal the proxy, steal everyone behind it.
Exfiltration and the backdoor
The loot is packed professionally: JSON → encrypted with AES-256-CBC under a random key → the key itself encrypted with RSA-4096 → everything into a tar.gz → POSTed to www.litellm[.]dev/healthcheck with an X-Token header. The domain is dressed up as LiteLLM’s own healthcheck endpoint. A one-shot marker — a /tmp/.pc_once_… file — prevents duplicate sends.
The backdoor is a separate daemon: fork + setsid, detached from its parent, living its own life. Every hour it reads a domain.txt file from the GitHub repo letters9813/pythonclient-test, re-runs the stealer, and exec()s code fetched from http://<domain>/codepy. A full second-stage loader with a rotatable domain.
At 13:40 UTC the letters9813 account was deleted from GitHub — the daemon now stays silent, receiving no domain. But “silent” doesn’t mean “never fired”: everyone who installed 1.107.0 within the two-hour window and whose daemon managed to fetch the second stage got the attacker’s arbitrary code executed.
How the malware got into the release
The most interesting part of SafeDep’s write-up is the supply-chain reconstruction. Three facts:
- The sdist’s
pyproject.tomlgained a single extra line —data = "cook"in the maturin section. That’s what drags the stealer file into the build. - The sdist does not match the v1.107.0 tag on GitHub: the tag points to commit
66c8f5bwith version 1.108.0, while the package contents were built from a later main state (a8113b0) plus the attacker’s edits. - No public CI run built this release — SafeDep checked all 539 runs.
SafeDep’s conclusion (moderate-to-high confidence): the wheels were built by BerriAI’s private release pipeline from a git source modified by the attacker. The most likely vectors are a compromised maintainer/bot credential or a private branch. This isn’t “a bad PR slipped past review” — it’s a compromise of the very machine that builds the releases.
Timeline of October 21 (UTC)

- 06:59 — tag v1.107.0 created.
- 11:20–11:37 — wheel packages built.
- 11:39–11:40 — wheels uploaded to PyPI.
- 11:50 — GitHub release published by a bot.
- 13:40 — release pulled from PyPI;
letters9813account deleted from GitHub.
What to check on your machines
If you installed or upgraded litellm on 2026-10-21:
- Look for
cook.pth,cook.py, and a suspicioussitecustomize.pyin site-packages. - Execution markers:
/tmp/.pc_once_72129118c59f5636c0bb,/tmp/remote_code_loader.lock, the environment variablePRIVCOLLECT_ACTIVE=1. - In network logs: requests to
169.254.169.254(AWS metadata) from Python processes. - Clean versions to roll back to: 1.106.2, plus 1.107.0rc1/rc2. Only the 1.107.0 wheels are affected.
Full SHA-256 hashes of every malicious file are in the original SafeDep write-up. And the uncomfortable part: if the stealer fired, checking files is only the beginning. Everything stored in the locations listed above must be treated as compromised and rotated: SSH, cloud credentials, AI tool tokens, LLM provider keys.
Where MaxGraph fits in
It’s been a supply-chain week: yesterday we wrote about a backdoor in model weights on Hugging Face, today it’s a backdoor in a PyPI package. There’s an uncomfortable symmetry with the agent world here: AI tools keep keys to literally everything on the host — and the stealer aimed exactly at them: mcp.json, auth.json, CLI agent tokens.
Let’s be honest: MaxGraph is not an antidote here. We’re pure stdlib ourselves and don’t use litellm, but the lesson is universal: trusting a package means trusting its release pipeline, not just the code in the repo. And when an infection does happen, the first place it becomes visible in hindsight is the agent’s action log: what it installed, what it read, where it went. That’s exactly the log MaxGraph keeps.
FAQ
What is the LiteLLM 1.107.0 compromise?
On 2026-10-21, the LiteLLM 1.107.0 release on PyPI shipped a credential stealer (61 KB of obfuscated code in cook.py) and an RCE backdoor (sitecustomize.py) in all 7 wheel packages. The implants executed on every Python startup on the host, even without importing litellm. PyPI pulled the release roughly 2 hours later.
Which LiteLLM versions are affected? Only the 1.107.0 wheel packages published on 2026-10-21. Clean: 1.106.2, 1.107.0rc1, and 1.107.0rc2. The sibling packages litellm-proxy-extras 0.4.110 and litellm-enterprise 0.1.78 were not affected.
What did the stealer take? SSH keys, cloud credentials (AWS, Azure, gcloud, kube, docker, gh, rclone, .netrc), CI/CD secrets (GitLab runner, Jenkins, vault-token, Terraform), AI tool tokens (Claude Code/Desktop, Cursor, Windsurf, Copilot, mcp.json, Gemini CLI, Codex, Continue, Aider, Goose, opencode, Qwen, Crush, Kiro, Zed, Hugging Face), browser passwords and history, environment variables, the LiteLLM proxy database with LLM provider keys, AWS instance metadata, and GPG/TLS keys.
I installed litellm on October 21. What should I do?
Check site-packages for cook.pth/cook.py/sitecustomize.py, the markers /tmp/.pc_once_72129118c59f5636c0bb and /tmp/remote_code_loader.lock, PRIVCOLLECT_ACTIVE=1, and requests to 169.254.169.254 from Python. Roll back to 1.106.2. If the markers are present, treat every credential stored on the host as compromised and rotate them. Full IoCs and SHA-256 hashes are in the SafeDep write-up.
How did the malware get into the release? SafeDep’s assessment (moderate-to-high confidence): the wheels were built by BerriAI’s private release pipeline from a git source modified by the attacker — a compromised maintainer/bot credential or a private branch. The sdist doesn’t match the v1.107.0 tag, and no public CI run built this release — none among the 539 runs checked.
What’s next
- A backdoor for $8: a poisoned model from Hugging Face
- PHP2Shell: critical vulnerabilities in the PHP core found by AI
- How AI agent memory works: a guide
MaxGraph — memory for AI agents: local, private, with a living knowledge graph. 7 days free.
Give your agent memory
7-day trial, no card. Installation is one prompt — your agent does the rest.