On October 21, 2026, attackers hijacked LiteLLM's release pipeline and published a malicious version 1.107.0 to PyPI and Docker. For about two to three hours, anyone who installed or pulled the latest LiteLLM got a credential stealer and a remote code loader along with it.

LiteLLM isn't a household name, but it sits underneath a lot of AI tooling. If your team builds anything with large language models, there's a real chance it's somewhere in your stack, possibly without anyone choosing it directly.

🛑Editorial note: This write-up is for defenders. We don't publish malware code, attacker infrastructure, or step-by-step attack details, and we don't name threat actors. Naming groups gives them publicity they want and doesn't help you defend. Everything here is about finding exposure and fixing it.

The short version

Details
WhatSupply chain compromise of the LiteLLM release pipeline
Malicious versionlitellm 1.107.0 (PyPI wheels and Docker images)
Docker tags affectedv1.107.0, plus latest, main-latest, and main-stable while they pointed to it
Exposure windowOct 21, roughly 11:39–13:23 UTC on PyPI and 11:46–14:20 UTC on Docker (sources vary slightly)
PayloadCredential stealer plus an hourly remote code loader, started automatically by Python
Safe version1.106.2, or a later release LiteLLM confirms is clean
Not affectedImages pinned by digest to an earlier build; installs of earlier pinned versions
CVENone assigned (it's a malicious release, not a bug)

LiteLLM, explained for those in the back

Every AI provider has its own API. OpenAI, Anthropic, Google, AWS Bedrock, Azure, Mistral, and local tools like Ollama all expect slightly different requests and return slightly different responses. If your app needs to use more than one, that gets messy fast.

LiteLLM fixes that. It's a popular open-source project that comes in two forms:

  1. A Python library. Your code calls one function in one format, and LiteLLM translates it for whichever of more than a hundred providers you've picked. Switching from one model to another can be a one-line change.
  2. A proxy server, often called an AI gateway. Teams run it as a central service. Every app and developer sends AI requests to the gateway instead of straight to the providers. The gateway handles the provider API keys, tracks spending per team, enforces rate limits and budgets, logs requests, and hands out its own "virtual keys" to users.

Think of it as a switchboard between your company and every AI provider it uses. That's what makes it so useful, and also what makes it such a valuable target:

What happened on October 21

The project's real source code wasn't changed. Instead, the attacker took control of the release process and fed it a different source.

How the attacker got in

Accounts differ on the very first step, and investigations are ongoing. What's been reported so far:

The lookalike repository trick

The release workflow was pointed at a lookalike repository whose name differed from the real one by a single hyphen (Berri-AI/litellm instead of BerriAI/litellm). That copy carried extra commits that added the malicious code. The official pipeline then built, signed, and published it as if it were a normal release.

That detail matters. Signature checks would have passed, because the signature only proves the official pipeline produced the package. It doesn't prove what source code the pipeline was fed. The build provenance record did show the difference: it named the hyphenated repository instead of the real one.

What the malware does (high level)

The malicious wheels add files to Python's site-packages folder that Python runs automatically every time it starts, whether or not your code ever imports LiteLLM. Reported files are cook.pth, cook.py, and sitecustomize.py.

Once running, it reportedly:

Because it runs at Python startup, simply having 1.107.0 installed in an environment was enough. And uninstalling the package afterwards doesn't undo anything that already ran or bring back stolen keys.

The response

LiteLLM pulled the release from PyPI and repointed the affected Docker tags within hours, locked down its registries, removed most members from its GitHub organization, and started revoking credentials. The lookalike repository is gone.

Not the first time this year

LiteLLM has had a rough 2026, which is worth knowing if you're deciding how much to trust any single dependency:

If you run an old LiteLLM proxy, the safe version above also fixes all of those.

Am I affected?

You're likely affected if any of these happened on October 21, 2026:

How to check:

  1. Check the installed version in every Python environment, including CI runners and containers. In each environment, run:
pip show litellm
  1. Look for the planted files. Search each environment's site-packages folder for cook.pth, cook.py, or an unexpected sitecustomize.py. Finding any of them means the environment ran the malicious code.
  2. Check transitive installs. Search your lockfiles (requirements.txt, poetry.lock, uv.lock) for litellm, even in projects that never use it directly.
  3. Check your images. Review which LiteLLM image digests your clusters and hosts pulled on October 21, and what your mirrors cached.
  4. Check your build logs for installs of 1.107.0 during the window.

What to do if you were affected

Treat every machine, container, or CI runner that ran 1.107.0 as compromised. Removing the package isn't enough.

  1. Isolate the affected hosts and containers, and stop any running LiteLLM processes from the bad version.
  2. Rotate every secret the machine could reach, from a clean device. That means AI provider API keys, cloud credentials, LiteLLM master and virtual keys, database passwords, GitHub and CI tokens, SSH keys, and anything stored in environment variables or config files. Assume all of it was stolen.
  3. Rebuild, don't clean. Recreate virtual environments and images from scratch on litellm==1.106.2 (or a later confirmed-clean release). For containers, pin by digest, not by tag.
  4. Clear caches and mirrors that may still hold 1.107.0.
  5. Check for misuse of the exposed credentials: unusual AI usage and spend, new cloud resources or users, unexpected GitHub activity, and access from unfamiliar locations.
  6. Report it internally under your incident response process, and tell your AI and cloud providers if you see their keys being abused.
⚠️Watch your AI bill: stolen AI provider keys are often resold or used to run up large usage bills. Set spending limits and alerts with each provider now, even if you think you weren't affected.

How to protect yourself going forward

This incident is a textbook example of modern supply chain risk. These habits would have stopped or limited the damage, and they apply to every dependency, not just LiteLLM.

Pin and verify what you install

Treat your AI gateway like critical infrastructure

Lock down your own pipeline

Limit what a stolen key can do

Why this one matters

AI gateways concentrate a company's most valuable AI credentials in one place, and AI tooling moves fast, with frequent releases that teams install without much scrutiny. That combination makes projects like LiteLLM attractive targets, and this year shows attackers have noticed.

The lesson isn't "stop using LiteLLM." It's that anything holding the keys to your AI stack deserves the same care as your identity provider or your password manager: pinned, verified, isolated, monitored, and quick to rotate.

🎓Building with AI agents? Our guides to Claude Code for cybersecurity workflows and agentic workflows with Ollama cover how to run AI tooling safely. For the fundamentals of incident response, see the Google Cybersecurity Certificate review.

Sources

This write-up was compiled from LiteLLM's own advisory and security research published October 21–24, 2026. Where sources disagree, we've said so. Threat actor names that appear in some sources have been left out on purpose.

This is a developing story. We'll update this page as LiteLLM and investigators publish more.

← All Write-ups