On October 21, 2026, LiteLLM's release pipeline was compromised, pushing a malicious v1.107.0 build to both PyPI and Docker Hub. The package contained a credential-stealing payload and a remote-access trojan (RAT) — and it was downloadable by anyone running pip install litellm or pulling the latest Docker tag during the exposure window. If your team uses LiteLLM as an LLM gateway or proxy, here's exactly what happened and what to check.
What Happened
Attackers obtained stolen GitHub CLI OAuth tokens belonging to three LiteLLM engineers. Using those tokens, they modified the release pipeline and triggered a production release built from an attacker-controlled source repository, then approved it using a second compromised account — bypassing the normal review process. The resulting v1.107.0 build was published to PyPI and to Docker Hub under the v1.107.0, latest, main-latest, and main-stable tags.
Root-cause analysis traced the initial foothold back further: a master key had been accidentally committed to a public repository in May 2026 and was never revoked, giving attackers a long-standing credential to work from months before the actual release compromise.
What the Malicious Package Did
The compromised build shipped two malicious capabilities baked directly into the package:
- A credential stealer that executes automatically at Python startup, scanning for and exfiltrating API keys, cloud credentials, and other secrets accessible from the environment running LiteLLM.
- A remote-access trojan (RAT) that periodically checks in with an attacker-controlled server and can fetch and execute additional arbitrary code on the host — giving attackers a persistent foothold beyond the initial credential theft.
Because LiteLLM is typically deployed as a gateway sitting in front of multiple LLM providers, a compromised instance is especially high-value: it's often configured with API keys for OpenAI, Anthropic, Azure, AWS, and other providers all in one place.
Exposure Window: Who Was Affected
The compromise was live for a short but meaningful window on October 21, 2026:
- PyPI package (
litellm==1.107.0): live from 11:39 UTC to 13:23 UTC — roughly two hours. - Docker images (
v1.107.0,latest,main-latest,main-stable): live from 11:46 UTC to 14:20 UTC.
If your CI/CD pipeline, deployment script, or Dockerfile pulled LiteLLM during either window — even via an automated latest tag pull — you need to treat that environment as potentially compromised. All other LiteLLM versions, before and after v1.107.0, are confirmed safe. LiteLLM's private enterprise release was not affected; only the public PyPI package and the public Docker tags listed above were compromised.
Step-by-Step: How to Respond
- Check what version you actually have deployed. On any host or container running LiteLLM:
pip show litellm # or, inside a running container docker exec <container> pip show litellm - If you find v1.107.0 anywhere, assume the host is compromised — not just the package. Credential stealers and RATs run arbitrary code on the host; a version bump alone does not undo that. Isolate the host from your network immediately.
- Rebuild affected hosts and containers from a clean, known-good image. Don't attempt to "clean" a compromised instance in place — rebuild from scratch and reinstall a verified safe version:
pip install litellm==<last known-good version> # Docker — rebuild from an explicitly pinned, verified tag FROM litellm/litellm:v1.106.x - Rotate every credential reachable from the affected environment. This is the step teams most often underscope. At minimum, rotate:
- All LLM provider API keys configured in LiteLLM (OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, etc.)
- Cloud provider credentials (IAM keys, service account tokens) accessible from the host
- Database passwords and connection strings reachable from the environment
- SSH keys and any secrets stored in environment variables or mounted secret files
- Audit outbound network logs for the affected window (October 21, 2026, roughly 11:39–14:20 UTC) and afterward, looking for connections to unfamiliar external hosts consistent with RAT check-in traffic.
- Pin dependency versions going forward instead of tracking
latestin production. Use lockfiles and pinned Docker tags, and consider adding package integrity verification (hashes, provenance attestation) to your CI/CD pipeline so a hijacked upstream release can't silently flow into production.
The Bigger Lesson: Pipeline Compromise, Not Code Compromise
This wasn't a vulnerability discovered in LiteLLM's source code — it was a compromise of the release pipeline itself, using stolen maintainer credentials to push a malicious build from an attacker-controlled source. That distinction matters: reviewing LiteLLM's public GitHub source wouldn't have caught this, because the malicious code was injected at build/release time, not committed to the visible repository history. It's a reminder that supply chain security has to cover the entire path from source to published artifact — not just the code you can read on GitHub.
Further Reading
- LiteLLM Official Advisory: Security Incident, October 21, 2026
- LiteLLM: The Attack Chain Behind the v1.107.0 Release
- The Hacker News: LiteLLM Compromised in Supply Chain Attack
- Datadog Security Labs: LiteLLM Supply Chain Compromise
- Socket.dev: LiteLLM PyPI and Docker Compromise
Running LiteLLM or Other AI Gateways in Production?
Ez IT Expert helps businesses audit their AI infrastructure for supply chain exposure — pinned dependencies, credential rotation policies, and CI/CD provenance checks — so a compromised upstream package doesn't become a breach. If you're not sure whether you pulled the affected LiteLLM build, we'll help you find out and fix it.
Get a Free Supply Chain Exposure Check →