Last updated: November 2026
Key Takeaways
- LiteLLM was poisoned twice in 2026. On March 24, attackers published versions 1.82.7 and 1.82.8 to PyPI using a stolen publishing token. On October 21, a different intrusion pushed version 1.107.0 to PyPI, Docker Hub, and GHCR through LiteLLM's own release pipeline. All three versions steal credentials the moment Python starts.
- Both attacks went through trusted tooling. The March token leaked from a compromised Trivy security scanner in LiteLLM's CI pipeline. The October attackers used GitHub CLI tokens that LiteLLM says were captured in its own AI gateway logs. In August 2026, Australian police charged two alleged members of TeamPCP, the group behind the March campaign.
- A home AI stack can be exposed without ever installing LiteLLM directly. It arrives as a sub-dependency of MCP servers and agent frameworks. Dependency cooldowns (now built into pip 26.1 and uv), hashed lock files, Docker digest pinning, and network isolation would have blocked or contained both incidents.
This guide covers both LiteLLM supply chain attacks of 2026 (malicious versions 1.82.7, 1.82.8, and 1.107.0), how to check every Python environment and Docker container on your machines, which version is safe to pin, and how to harden a self-hosted AI setup built on Ollama, n8n, AnythingLLM, MCP servers, or any Python-based agent tool.
Is LiteLLM safe to use now?
LiteLLM is safe to use if you pin an explicit, verified version and never installed 1.82.7, 1.82.8, or 1.107.0. As of November 2026, the maintainers recommend litellm==1.106.2 or a release re-signed after October 24, 2026, and no other versions are known to carry the malware. The risk was never in LiteLLM's own code: both incidents came from stolen publishing credentials, so the protection is pinning, a dependency cooldown, and keeping the package away from your credentials.
| LiteLLM version | Status | Published (UTC) |
|---|---|---|
| 1.78.0 through 1.82.6 | Clean (audited by LiteLLM, March 2026) | Before March 24, 2026 |
| 1.82.7 | Malicious, removed from PyPI | March 24, 2026, 10:39 |
| 1.82.8 | Malicious (litellm_init.pth), removed from PyPI |
March 24, 2026 |
| 1.83.0 through 1.106.2 | No known compromise; 1.83.0 verified clean, 1.106.2 is LiteLLM's recommended pin | March 30 to October 2026 |
| 1.107.0 | Malicious (cook.pth, sitecustomize.py), removed from PyPI, Docker Hub, GHCR |
October 21, 2026, 11:39 |
| 1.103.8, 1.104.6, 1.105.4, 1.106.3 and later | Post-incident releases signed with LiteLLM's new cosign key | From October 24, 2026 |
What happened in the LiteLLM supply chain attacks?
LiteLLM, an open-source Python library that routes requests to more than 100 large language model providers through one interface, shipped malicious releases twice in 2026: versions 1.82.7 and 1.82.8 on March 24, and version 1.107.0 on October 21. Each one ran a credential stealer on any machine that installed it.
A supply chain attack is one where the attacker poisons a trusted piece of software upstream, so every user who installs or updates it receives the malicious code through normal channels. LiteLLM is an attractive target because its job is to hold API keys for every AI provider a team uses. PyPI's own incident report says LiteLLM is installed about 15 to 20 million times per week.
| Detail | March 2026 incident | October 2026 incident |
|---|---|---|
| Malicious versions | 1.82.7, 1.82.8 (PyPI only) | 1.107.0 (PyPI wheels, plus Docker Hub and GHCR tags v1.107.0, latest, main-latest, main-stable) |
| Date (UTC) | March 24, 2026, from 10:39 | October 21, 2026, from 11:39 |
| Time live on PyPI | 2 hours 32 minutes, per PyPI | About 1 hour 44 minutes (11:39 to 13:23) |
| How attackers got in | PyPI publishing token stolen by a poisoned Trivy scanner in LiteLLM's CI | Three developers' GitHub CLI OAuth tokens, which LiteLLM believes were read from its internal gateway logs |
| Startup trigger |
litellm_init.pth (1.82.8) |
cook.pth and sitecustomize.py
|
| Exfiltration domain | models.litellm[.]cloud |
litellm[.]dev |
| Safe pin | 1.82.6 or earlier, or 1.83.0 and later (except 1.107.0) | 1.106.2, or the re-signed releases published from October 24 |
| Attribution | TeamPCP | Not attributed; no public link to TeamPCP |
LiteLLM security incident timeline, 2026
The LiteLLM compromises sit inside a longer chain of events that started with an AI bot probing a security scanner in February and ended with arrests in August and a second poisoned release in October.
-
February 21 to 28: A GitHub account called
hackerbot-claw, describing itself as an autonomous AI security research agent, exploits a misconfigured GitHub Actions workflow in Aqua Security's Trivy and steals a privileged token. - March 1: Aqua discloses the Trivy incident and rotates credentials. The rotation is later found to be incomplete.
-
March 19: TeamPCP publishes a malicious Trivy v0.69.4 and hijacks the
trivy-actionandsetup-trivyGitHub Actions. LiteLLM's CI runs the poisoned scanner and its PyPI token is captured. - March 23: Checkmarx KICS GitHub Action hijacked with stolen credentials.
- March 24: LiteLLM 1.82.7 and 1.82.8 published to PyPI at 10:39 UTC; quarantined 2 hours 32 minutes later.
- March 27: Telnyx Python SDK 4.87.1 and 4.87.2 poisoned by the same campaign.
- March 30: LiteLLM releases clean v1.83.0 through a rebuilt CI/CD pipeline.
- April 2: PyPI publishes its incident report recommending dependency cooldowns and hashed lock files.
-
April 24: Python accepts PEP 829, deprecating executable
.pthimport lines. - July 2: FBI issues FLASH-20260702-01 on TeamPCP.
- August 11: CloudSEK reports potential exposure of 2,500+ organizations from the March releases.
- August 26: Australian Federal Police arrest two alleged TeamPCP members in Western Australia.
- October 9: Python 3.15 ships with the PEP 829 changes.
- October 21: LiteLLM 1.107.0 published to PyPI, Docker Hub, and GHCR through a hijacked release pipeline; removed within about two hours.
- October 23: LiteLLM rotates its cosign signing key and moves releases to a locked-down private pipeline.
What happened in the March 2026 LiteLLM attack?
On March 24, 2026, attackers holding a stolen PyPI token uploaded LiteLLM 1.82.7 and 1.82.8 directly to PyPI, bypassing the project's normal release workflow. LiteLLM's security update says version 1.82.7 hid its payload in proxy_server.py, while 1.82.8 added a file called litellm_init.pth.
That second file is what made 1.82.8 so dangerous. A .pth file is a startup hook that Python processes every time the interpreter launches. You did not need to import LiteLLM or run code that used it. Every Python script, every IDE language server, and every pip command on the machine ran the attacker's code.
PyPI's incident report puts total exposure at 2 hours 32 minutes from upload to quarantine, with over 119,000 downloads of the bad versions in that window. PyPI estimates that 40 to 50 percent of LiteLLM installs were unpinned, meaning they grabbed whatever version was newest. LiteLLM tells users to treat any install between 10:39 and 16:00 UTC on March 24 as suspect. The incident is tracked as CVE-2026-33634.
What did the March LiteLLM malware steal?
The March payload harvested SSH private keys, AWS, Google Cloud, and Azure credentials, Kubernetes secrets, database passwords, Git credentials, environment variables holding API keys, cryptocurrency wallet files, SSL private keys, and shell history. It encrypted the haul with AES-256, wrapped the key with RSA-4096, and sent it to models.litellm[.]cloud, a lookalike domain with no connection to LiteLLM.
On machines with Kubernetes access, it went further. Researchers documented it deploying privileged node-setup-* pods to every node and installing a persistent backdoor (sysmon.service) that polled for more payloads.
How was the March LiteLLM attack discovered?
It was found by accident, because the malware crashed the machine it infected. Callum McMahon of FutureSearch wrote that Cursor launched an MCP server with an unpinned LiteLLM dependency, so uvx pulled the poisoned release automatically. Each Python child process re-triggered the .pth file, which spawned about 11,000 processes and froze his 48 GB Mac.
That bug is the only reason the attack surfaced within hours. Andrej Karpathy noted publicly that if the attacker had not written such sloppy, "vibe coded" malware, it could have gone undetected for days or weeks.
How did the Trivy breach lead to the LiteLLM breach?
LiteLLM's CI pipeline ran Trivy, a widely used open-source vulnerability scanner, without pinning it to a fixed version. When a poisoned Trivy ran inside that pipeline on March 19, it captured LiteLLM's PyPI publishing token, and five days later that token published the malicious releases.
The Trivy compromise itself traces back to late February, when a GitHub account called hackerbot-claw, which described itself as an autonomous AI security research agent running on Anthropic's Claude Opus 4.5, exploited a misconfigured GitHub Actions workflow in Aqua Security's repository and took a privileged token. Aqua's own account says it disclosed and rotated credentials on March 1, but the rotation was incomplete, so the attackers kept access. On March 19 they force-pushed malicious commits to at least 75 version tags of trivy-action, all 7 tags of setup-trivy, and published a malicious Trivy v0.69.4 binary. Any pipeline that ran them had its secrets harvested. Aqua attributes the campaign to TeamPCP.
The same stolen credentials were then used against Checkmarx KICS on March 23, LiteLLM on March 24, and the Telnyx Python SDK on March 27. The downstream damage reached large companies. Our report on the Cisco source code theft linked to Trivy covers one of them.
What happened in the October 2026 LiteLLM compromise?
On October 21, 2026, an attacker used three LiteLLM engineers' GitHub CLI tokens to run the project's private release workflow against a lookalike repository (Berri-AI/litellm) and publish a malicious version 1.107.0. LiteLLM's incident report lists the exposure windows in UTC:
-
PyPI: all seven
litellm==1.107.0wheels, 11:39 to 13:23. -
Docker Hub: tags
v1.107.0,latest,main-latest, andmain-stable, 11:46 to 14:20. -
GHCR: the same tags on
litellm,litellm-database, andlitellm-non_root, 11:46 until made unavailable by 13:51.
The official v1.107.0 source tag on GitHub does not contain the malware, and customers on LiteLLM's private enterprise registry were not affected. Wiz counted roughly 49,000 PyPI downloads during the window. Unlike March, Docker users were hit this time: anyone whose container pulled latest or main-stable in that window received the bad image.
How did attackers get LiteLLM's release credentials in October?
LiteLLM says the stolen tokens most likely came from its own AI gateway logs. According to the incident report, Claude Code can embed a user's GitHub CLI OAuth token in a response body. LiteLLM's internal deployment logged those bodies, and an unexpected, innocuously named user account on that deployment was reachable from the public internet. LiteLLM suspects a recently patched vulnerability was the way in but has not confirmed it.
Two other controls had been loosened. Release permissions were temporarily widened two days earlier so two engineers could publish bugfix backports, and one stolen token belonged to a GitHub organization owner, which let the attacker disable branch protection five seconds after it blocked the change.
What did LiteLLM 1.107.0 steal?
Version 1.107.0 installed cook.pth, cook.py, and sitecustomize.py into site-packages, so the stealer ran on every Python start, including pip. It collected browser credentials and cookies, SSH keys, cloud credentials, GitHub CLI tokens, package registry tokens, .env files, Vault and Terraform secrets, and AI coding tool configurations. If a DATABASE_URL was set, it dumped the LiteLLM proxy's stored provider keys. It sent data to litellm[.]dev and started a detached daemon that checked a GitHub dead-drop hourly for more code.
LiteLLM has since moved releases to a private repository using trusted publishing, made Docker release tags immutable, signs images with cosign, and rotated its cosign key on October 23 after the old private key was likely exposed. The compromised 1.107.0 images carry a valid signature from the old key, so verify images by digest, not by signature alone.
Who is TeamPCP, and have they been arrested?
TeamPCP is the cybercrime group behind the March Trivy, Checkmarx KICS, LiteLLM, and Telnyx compromises, and it has also been linked to the Shai-Hulud npm worm of late 2025. On August 26, 2026, the Australian Federal Police, working with the FBI and Western Australia Police, arrested two Western Australian men, aged 21 and 23, on a combined 14 charges. The FBI alleged the group's code potentially compromised more than 1,000 organizations. The charges are allegations and have not been proven in court.
The FBI issued a FLASH advisory on TeamPCP (FLASH-20260702-01) on July 2, 2026, warning that affiliated actors are likely to keep using harvested credentials long after the original intrusion. In August, threat intelligence firm CloudSEK reported that a dataset of captured attacker files maps potential exposure from the March LiteLLM releases to more than 2,500 organizations and about 434,000 CI/CD pipelines. CloudSEK sells an exposure-monitoring product, and its counts describe potential exposure, not confirmed victims.
The October 1.107.0 attacker has not been publicly identified. Socket and Datadog have both said no link to the March incident has been established.
Why do the LiteLLM attacks matter for a home AI setup?
You can have LiteLLM on your machine without ever typing pip install litellm. It is a transitive dependency for many AI tools: DSPy, CrewAI, and a long list of MCP servers and agent frameworks pull it in automatically. The developer who found the March attack never chose to install it.
The pattern is also not specific to LiteLLM. Any Python package, npm module, or container image can be poisoned the same way, through a stolen publishing token or a hijacked release pipeline. We saw the same playbook in the Axios npm supply chain attack and the Mini Shai-Hulud npm worm. If you followed our guide to building a zero-cost AI agent stack with Ollama, n8n, and AnythingLLM, or you run any Python-based AI tools on your home network, every package in that dependency tree is a trust decision.
How did an MCP plugin install LiteLLM without the developer knowing?
The Model Context Protocol (MCP) is a standard for connecting AI assistants to external tools and data. Many MCP servers launch through package runners such as uvx or npx, which download the server and its dependencies on first run, often at the latest available versions.
In the March incident, Cursor started an MCP server whose LiteLLM dependency was unpinned, so uvx fetched 1.82.8 without asking. The protocol itself did nothing wrong. The risk lives in the dependency trees behind MCP servers, which are rarely visible to the person enabling them. Our MCP explainer for network engineers covers how the protocol works.
How do you check if you were affected by the LiteLLM attacks?
Run pip show litellm in every Python environment, virtual environment, and container you use, and check which Docker image digests your LiteLLM containers started from. If you find 1.82.7, 1.82.8, or 1.107.0, or a container that pulled an affected tag during the October window, treat that environment as compromised.
These commands cover the common cases on Linux and macOS. Run them in each environment, including inside containers.
# Installed version and which packages pulled it in
pip show litellm
# Startup hooks dropped by the malicious releases
find / -name "litellm_init.pth" -o -name "cook.pth" -o -name "cook.py" 2>/dev/null
find / -path "*site-packages/sitecustomize.py" 2>/dev/null
# October persistence markers
ls -la /tmp/remote_code_loader.lock /tmp/.pc_once_* 2>/dev/null
ls -la ~/.config/sysmon/ ~/.config/systemd/user/sysmon.service 2>/dev/null
# Docker image digest a running container started from
docker inspect --format '{{.Image}}' <container-name>
-
Find every copy. Check system Python, each virtual environment, the
uvandpipcaches, and Docker containers. Search lock files and CI logs for the bad versions on March 24 or October 21. -
Look for the startup files. Search site-packages for
litellm_init.pth(March) orcook.pth,cook.py, andsitecustomize.pyplus their__pycache__copies (October). On Linux, check for~/.config/sysmon/sysmon.pyand~/.config/systemd/user/sysmon.service. In Kubernetes, look fornode-setup-*pods inkube-system. -
For 1.107.0, clean up before running Python. LiteLLM warns that
pipitself re-triggers the payload. Delete the files from a shell first, kill the process holding/tmp/remote_code_loader.lock, then rebuild the environment or image from scratch. -
Rotate everything the machine could reach. Do it from a clean device: SSH keys, cloud tokens, GitHub tokens, AI provider API keys, database passwords, and anything in
.envfiles. For a LiteLLM proxy, rotate the master key, virtual keys, and every provider key stored in its database. -
Reinstall a known-good version. Pin to an explicit version you have verified, such as
litellm==1.106.2, rather thanlatest.
Finding nothing does not prove a system is clean. If a bad version ran on a machine with internet access, assume the data left.
How do you protect your local AI stack from supply chain attacks?
No single setting stops every supply chain attack, but a few layered habits would have blocked or contained both LiteLLM incidents. These apply whether you run Ollama on a mini PC, a full n8n automation server, or occasional Python experiments.
Should you pin Python dependencies with a lock file?
Yes. Pin every package to an exact version and record its hash, so an upload of a new malicious version cannot reach you automatically. PyPI recommends uv lock or pip-compile --generate-hashes, and notes that pip freeze is not a lock file because it omits checksums. pip has also added experimental lock file support through pip lock.
How do you set a dependency cooldown in pip or uv?
A dependency cooldown tells your installer to ignore any release newer than a set number of days. Both LiteLLM attacks were pulled from PyPI within about two and a half hours, so a 3-day cooldown would have skipped every malicious version.
-
pip 26.1 and later: add
uploaded-prior-to = P7Dunder[install]in~/.config/pip/pip.conf, or pass--uploaded-prior-to P7Don the command line. -
uv: set
exclude-newer = "P7D"under[tool.uv]inpyproject.toml, or globally in~/.config/uv/uv.toml.
PyPI suggests at least 3 days (P3D). A 7-day window adds margin for home lab machines that rarely need same-day updates. When you do need an urgent security fix, override the cooldown for that one install and check the release on the project's official GitHub page first.
Should you pin Docker images by digest instead of tag?
Yes. A tag like latest or main-stable can be repointed to a different image at any time, which is exactly what happened in October. Pinning to a digest (image@sha256:...) guarantees you get the exact image you tested. Avoid auto-updaters that pull new tags the moment they appear.
How do you keep AI tools away from your credentials?
Run AI tools in dedicated virtual environments or containers that cannot see your host's credential stores. Do not mount .ssh, .aws, or .env directories into containers unless a tool requires it, and keep high-value credentials off machines that run frequently updated software.
On the network side, put AI workloads on their own VLAN so a compromised AI box cannot reach your main workstation, NAS, or router admin page. Our network security guide for local AI walks through the isolation setup.
Are AI gateway logs a security risk?
Yes. A proxy that logs full requests and responses stores whatever passes through it, including tokens that coding agents echo back, and LiteLLM says that is how its October attacker got in. If you self-host LiteLLM or another gateway, turn off request and response body logging unless you need it, keep the admin interface off the public internet, and treat any stored logs as sensitive as your password vault.
How do you check what an MCP server installs?
Before enabling a new MCP server, read its pyproject.toml, requirements.txt, or package.json to see what it pulls in and whether versions are pinned. Install it once in a throwaway environment and inspect site-packages, or pin the server itself to a fixed version in your MCP client's config instead of letting uvx or npx fetch the latest. Our guide to auditing and securing MCP server connections covers the full process.
Should you use fewer dependencies?
Where your workflow allows it, yes. Ollama ships as a single Go binary with no Python dependency tree, so calling its API directly instead of routing through a multi-provider gateway removes an entire category of risk. Multi-provider routing and agent orchestration sometimes require extra packages, but each one should be a deliberate choice.
One more monthly fee to kill
Renting your modem? That's $120+ a year.
Own it instead. It pays for itself in months. 90-day warranty and 30-day returns.
Pick your provider:
What do the LiteLLM attacks show about AI tools and AI infrastructure?
AI tools now sit on both sides of these incidents. In February, an account describing itself as an autonomous AI agent probed Trivy's CI. In March, the stolen credentials poisoned an AI gateway, and the attack surfaced because an AI coding assistant's MCP server installed it. In October, LiteLLM says tokens echoed by an AI coding agent and stored in an AI gateway's logs opened the door again.
The answer is not to avoid AI tools. It is to run them on infrastructure you understand and control: local models on hardware you own, on networks you have segmented, with dependencies you have pinned and audited. That is what digital sovereignty means in practice, and two compromises of the same package in seven months make the case better than any theory could.
Frequently Asked Questions
Is LiteLLM safe to use after being hacked?
Yes, with pinning. No version other than 1.82.7, 1.82.8, and 1.107.0 is known to carry malware, and LiteLLM has moved to a locked-down release pipeline with trusted publishing and immutable Docker tags. Pin an explicit version, set a dependency cooldown, and keep the proxy's logs and admin interface off the public internet.
Was my machine compromised if I have LiteLLM installed?
Only if it installed or ran version 1.82.7 or 1.82.8 (March 24, 2026), or version 1.107.0 or an affected Docker tag (October 21, 2026). Run pip show litellm in each environment and check your container image digests. Any other version is not affected by these two incidents.
Which LiteLLM version is safe to use now?
Pin an explicit version you have verified rather than latest. LiteLLM lists 1.82.6 and earlier and the 1.83.0 release as clean for the March incident, and recommends litellm==1.106.2 or the releases re-signed with its new cosign key from October 24 (such as 1.106.3) after the October incident. Combine the pin with a dependency cooldown.
I use Ollama for local AI. Am I affected?
Ollama itself is not affected. It is a standalone Go binary that does not use Python packages. If you also run Python-based tools alongside it, such as n8n workflows that call Python scripts, AnythingLLM integrations, or MCP servers, check those environments separately.
What is a transitive dependency, and why does it matter here?
A transitive dependency is a package you never installed yourself but that arrived because something you did install requires it. If you install Package A and it requires Package B, Package B is transitive. Many people received LiteLLM this way through DSPy, CrewAI, or an MCP server, which is why auditing the full dependency tree matters.
What is cook.pth, and how do I remove it?
cook.pth is the startup hook dropped by LiteLLM 1.107.0, alongside cook.py and sitecustomize.py. Remove all three and their __pycache__ copies from a shell before running any Python command, since pip uninstall would trigger the payload again, then kill the daemon holding /tmp/remote_code_loader.lock and rebuild the environment from scratch.
Was the LiteLLM Docker image affected?
Not in March, but yes in October. The March payload lived only in the PyPI packages, and the official proxy image pinned clean versions. On October 21, 2026, the Docker Hub and GHCR tags v1.107.0, latest, main-latest, and main-stable pointed at a malicious image for about two and a half hours.
What is a .pth file, and has Python fixed the problem?
A .pth file in site-packages is processed every time Python starts, and lines beginning with import are executed as code. PEP 829, accepted in April 2026, deprecates those import lines and adds a separate .start file for startup code in Python 3.15 (released October 9, 2026). Import lines still run in Python 3.15 through 3.17 and are ignored starting in 3.18, and the October attack also used sitecustomize.py, so pinning and cooldowns remain necessary.
How can I prevent supply chain attacks on my home lab?
Layer these habits: pin dependencies with hashed lock files, set a dependency cooldown of 3 to 7 days in pip or uv, pin Docker images by digest, run AI tools in isolated containers or virtual environments without host credentials, keep AI workloads on a separate VLAN, turn off body logging on any AI gateway, and check what MCP servers install before enabling them.
Is MCP itself a security risk?
MCP is a communication standard, not a package manager, and it was not the flaw in either incident. The risk comes from MCP servers that download unpinned dependencies on launch and run code on your machine. Apply the same scrutiny to an MCP server that you would to any software installed on a system holding your credentials. Our MCP security guide covers the full threat model.
Should I expect more attacks like this?
Yes. The October compromise came seven months after March, used a different method, and has not been tied to TeamPCP, while the FBI has warned that credentials stolen in the spring can still be used by affiliated actors. Assume any popular package can be poisoned, and set up your environment so a bad release cannot reach you on the day it is published.

