On October 21 the release pipeline of the popular LLM gateway LiteLLM was compromised. A malicious 1.107.0 was live on PyPI for about two hours (11:39 to 13:23 UTC), and the Docker tags v1.107.0, latest, main-latest and main-stable pointed to a poisoned image from 11:46 to 14:20 UTC. LiteLLM's incident report says the payload steals cloud, SSH, AI-tool and proxy keys on every Python start; the artifacts are pulled, OSS users should pin 1.106.2 and rotate secrets, and the private enterprise registry was not affected.

Key Takeaways

  • ✓Scope (vendor figures): all 7 PyPI wheels of litellm==1.107.0, live 11:39:51 to 13:23 UTC; 4 Docker Hub and GHCR tags poisoned from 11:46:56 UTC
  • ✓Attack chain: the attacker held 3 sets of developer GitHub CLI credentials, one belonging to an org owner, used it to disable branch protection and force-push, then had the release workflow build and sign from the lookalike repo Berri-AI/litellm
  • ✓Payload: cook.pth, cook.py and sitecustomize.py run on any Python start and survive uninstalling litellm; a second loader fetches remote code hourly
  • ✓Fix: delete the 3 files and matching .pyc first, then pin litellm==1.106.2 or rebuild from scratch, and rotate every provider key in the proxy DB, the master key and the database password
  • ✓This is LiteLLM's second supply-chain incident of 2026 (versions 1.82.7/1.82.8 in March); the GitHub source tag v1.107.0 itself is clean
LiteLLM 1.107.0 hit by a supply-chain compromise: PyPI wheels and Docker images shipped a credential stealer and backdoor; LiteLLM says it is contained and advises pinning 1.106.2
🖼️Official Media
Click to view high-res
🧭

Heavy Claude Code use: compare subscription limits and API bills

Compare 40 dev plans & simulate token costs vs $20/mo subscriptions

🔬

In-Depth Technical Analysis

Background and the problem

LiteLLM is the open-source Python library and proxy gateway many AI apps use to reach 100+ model providers; Datadog Security Labs puts it at about 23 million weekly downloads. A gateway holds every provider API key, so a poisoned release reaches far beyond a normal dependency. It is the project's second incident this year, after versions 1.82.7/1.82.8 in March, which led LiteLLM to move releases to a private repo and sign images.

How the attack worked

According to LiteLLM's incident report, the attacker obtained 3 sets of developer GitHub CLI OAuth tokens (LiteLLM believes they came from logs of an internet-exposed internal LiteLLM deployment, and says it observed Claude Code embedding gh tokens in response bodies in specific cases), one of them an org owner's. The attacker disabled branch protection, force-pushed a change pointing the release workflow at the lookalike repo Berri-AI/litellm, and signed and published the poisoned artifacts. JFrog and Datadog found three extra files in the wheels, cook.pth, cook.py and sitecustomize.py, which run on every Python start without importing litellm; they are absent from the sdist and Git tag, so source-only review misses them.

Benchmarks and figures

No benchmarks apply. LiteLLM's timeline: the PyPI release was live from 11:39 to 13:23 UTC; the Docker Hub and GHCR tags v1.107.0, latest, main-latest and main-stable were poisoned from 11:46 UTC, with GHCR cleared by 13:51 UTC and Docker Hub by 14:20 UTC. Socket says its scanner flagged all 7 wheels 7 minutes after publication. No CVE has been assigned yet.

What developers should do

Check with pip show litellm and search for litellm-1.107.0.dist-info, cook.pth and sitecustomize.py. Do not run pip install first, since any Python process re-triggers the payload: delete the three files and matching .pyc from the shell, kill the daemon holding /tmp/remote_code_loader.lock, then pin litellm==1.106.2, ideally rebuilding images and venvs from scratch. If the host had internet access, assume exfiltration and rotate every provider key in the proxy DB, the master and virtual keys, the DATABASE_URL password and cloud role credentials. Going forward, pin versions and image digests instead of floating latest tags.

Action HubReady to adopt this in production?

Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.

Up NextLiteLLM 1.103.1: bind UI/CLI session tokens to their own AES-GCM context (1.103.x security backport)
Read Now→