S-SCOTTEK← HomepageNewsGuidesBuyingTeamForumSupportlog in · sign up
2026-10-22 local-ai, self-hosting

LiteLLM 1.107.0 Was Backdoored: Check Your Self-Hosted AI Gateway Now

LiteLLM disclosed on October 21 that its release pipeline was compromised that morning and pushed a malicious litellm==1.107.0 to PyPI and to its Docker registries. The release contained credential-stealing malware plus a remote-access backdoor. The packages were live for roughly two hours before being pulled, and LiteLLM says every prior version is safe. If you self-host the LiteLLM proxy as the front door to your homelab AI stack, this one deserves your immediate attention.

What shipped and when

According to LiteLLM's incident report, written by CEO Krrish Dholakia, CTO Ishaan Jaffer, and Director of Security Oliver Jensen, the malicious PyPI wheels were live from 11:39 to about 13:23 UTC on October 21. Compromised Docker images under the v1.107.0, latest, main-latest, and main-stable tags were served from about 11:46 to 14:20 UTC on both Docker Hub and GHCR. All seven PyPI wheels were affected, and PyPI has since quarantined the version while the bad images were removed or repointed at clean artifacts.

Datadog Security Labs researcher Ian Kretz independently confirmed the scope, noting the release sat in the official channels for approximately two hours. The Hacker News reported corroborating analyses from SafeDep, Socket, StepSecurity, and Upwind. One detail worth knowing: the official v1.107.0 git tag contains no malicious code. The poisoned artifacts were built from an attacker-controlled lookalike repository, so reviewing the tag would not have caught anything.

How attackers got the project's own pipeline to build malware

LiteLLM's account is unusually candid. After the March incident it had moved releases into a private repository with trusted publishers and signed images. This time the attacker came in through credentials: stolen GitHub CLI OAuth tokens belonging to three engineers. LiteLLM believes the tokens leaked from logs of its own internet-exposed internal deployment, observing what it describes as situations in which an AI coding assistant embeds a user's GitHub CLI token into response bodies that then get logged.

With one engineer's token able to run workflows, the attacker tried to repoint the private releaser at a different source, was initially blocked by branch protections, then used a second credential belonging to an organization owner to override those protections and force the change through. The workflow was aimed at Berri-AI/litellm, which differs from the legitimate BerriAI/litellm by a single hyphen. A second account approved the production run; a third was used to delete the workflow records afterward. The signed, provenance-attested artifacts that came out the other end were genuine outputs of LiteLLM's own pipeline built from hostile source.

Why this payload is nastier than a bad library

Datadog's payload analysis explains why simply uninstalling is not enough. The wheels smuggled three files into Python's site-packages: cook.pth, cook.py, and sitecustomize.py. Python executes .pth files and sitecustomize.py automatically every time the interpreter starts, so the malware runs with any Python process on the machine, even if LiteLLM is never imported. Deleting the litellm package directory leaves these files behind, and running pip itself re-triggers them.

The stealer, which calls itself privcollect, sweeps broadly: cloud credentials including instance-metadata endpoints, SSH, GPG, and TLS keys, .env files and shell history, package-manager tokens, browser passwords and cookies, and sessions for AI coding tools. Stolen data is encrypted and posted to the lookalike domain www.litellm[.]dev/healthcheck. The backdoor wakes hourly, reads a command domain from an attacker GitHub dead-drop file, and executes whatever Python it is handed with no signature check. At the time researchers looked, the dead drop held only test values, so no second stage was observed, but the attacker can arm it at any time with a single commit.

For proxy operators there is one more bullet that matters: the stealer reads the LiteLLM proxy database and dumps the credentials table holding every upstream provider key. A gateway exists precisely so that one box holds all the keys, which makes that one box the highest-value target in the stack.

Who needs to act

You are affected if you installed litellm==1.107.0 from PyPI between about 11:39 and 13:23 UTC on October 21, or started one of the floating Docker tags between about 11:46 and 14:20 UTC. Check with pip show litellm and compare running container digests against the compromised image index published in the incident report. LiteLLM says customers on its private enterprise registry were not impacted.

If you are affected, LiteLLM's remediation guidance, credited to community reporter Lidor Machluf, is explicit. Do not start with pip install or pip uninstall, since any Python start re-runs the payload. Delete cook.pth, cook.py, sitecustomize.py, and matching __pycache__ files from every affected site-packages, kill the detached daemon holding /tmp/remote_code_loader.lock, and rebuild images and virtualenvs from scratch pinned to litellm==1.106.2. Then assume exfiltration succeeded and rotate everything the host could reach: cloud IAM roles, every provider key in the proxy database plus master and virtual keys, the DATABASE_URL password, and any secret present in any process environment. Cloud users should check CloudTrail for GetCallerIdentity calls around install time and for use of role credentials from outside their infrastructure.

What this means for your homelab

This is the second LiteLLM supply-chain compromise this year. Datadog notes the March incident hit versions 1.82.7 and 1.82.8 and was linked to Team activity, with no connection established between the two events. Two hijacks in seven months of the same project's release path is a pattern, not a fluke, and it lands hardest on exactly the audience that self-hosts AI gateways.

Three practical takeaways. First, pin everything: litellm==1.106.2 in requirements, digest-pinned images in Compose files, never floating latest tags on infrastructure that holds secrets. Unpinned installs inside the two-hour window are precisely who got caught. Second, treat your AI gateway as a tier-one secret store, because the malware's authors already do. The proxy database concentrates every provider key you own, so it deserves the same care as your password manager's host: isolated, backed up, and updated deliberately rather than on a cron. Third, this is a case study in why unattended auto-updates of security-sensitive containers need version gates. Independent analysis of the attack points out that Dependabot-style auto-merges of the version bump counted as exposure too.

LiteLLM says its investigation is ongoing with updates promised as findings land. If your proxy fleet sat quietly on 1.106.2 or earlier through October 21, no action is needed. If anything updated that day, check first and rotate second.

Comments (0)

No comments yet — start the thread.

Log in to comment.