We wrote about the first LiteLLM supply chain attack back in April. Different threat actor, different malware, same target. The most-downloaded AI model routing library on PyPI. Again.
On October 21, 2026, someone pushed LiteLLM 1.107.0 to PyPI with an infostealer and a remote access trojan baked into all seven built wheel files. The package was live for about two hours — 11:39 to 13:23 UTC — before PyPI pulled it. Roughly 49,000 installs happened in that window.
If you or anyone on your team ran pip install litellm or pip install --upgrade litellm on October 21, you need to act today.
What's different this time
The March attack used a .pth file to run credential-stealing code at Python startup. This one does the same thing but adds a persistent remote access trojan.
The infostealer targets:
- SSH keys
- AWS, Azure, and GCP credentials
- Browser saved passwords
- CI/CD tokens
- AI coding tool credentials — specifically Cursor, GitHub Copilot, and Claude Code configs
That last category is new. Whoever built this specifically added AI dev tool harvesting. These are the credentials that let someone impersonate your developers, push code, and run AI agents on your behalf.
The RAT side is what makes this worse than the March incident. According to Aikido's analysis, the background daemon polls for commands roughly every hour. Removing the package doesn't stop the RAT — it's already running.
The malicious code was embedded only in the pre-built wheel files. The GitHub source and the .tar.gz source tarball were clean. That detail matters: if your build process compiled from source, you're fine. If you installed the binary wheels from PyPI — which is the default — you're potentially affected.
The "it runs at startup" problem
Like the March attack, this payload doesn't wait to be imported. The code runs when the Python interpreter starts. Any Python process on an affected machine. Your linter. Your test runner. Your scheduled report script. All of it.
Wiz describes three files dropped into site-packages during install, with a sentinel file at /tmp/.pc_once_*. If you see that path pattern, the payload already fired.
Check first, then clean
Step 1: Check your installed version.
pip show litellm
If it shows 1.107.0, you're affected. Check your CI/CD runners and Docker environments, not just local machines.
Step 2: Look for RAT persistence.
ls /tmp/.pc_once_*
ls /tmp/remote_code_loader.lock
If either file exists, treat the machine as compromised and don't run additional Python on it to investigate — that risks re-triggering the payload.
Step 3: Rotate credentials.
Every credential on a machine that ran 1.107.0 should be considered stolen:
- AWS/GCP/Azure keys
- SSH keys
- Any
.envfile with API keys - GitHub tokens, Cursor config, GitHub Copilot tokens
LiteLLM's official incident post recommends pinning to version 1.106.2 and rebuilding virtualenvs and Docker images from scratch.
Why this library keeps getting hit
LiteLLM is the plumbing for a lot of AI tooling. It routes calls to 200+ model providers, so anything using it has active API keys for GPT-4, Gemini, Claude, Cohere, and whatever else your team is wired into. That's a dense credential target in one place.
It's also the kind of library that developers upgrade casually. Nobody pins litellm==1.106.2 in their requirements file — they pip install litellm and move on. Automated dependency update tools make this worse. When a library gets a new version, the update bot merges it without reviewing the PyPI wheel contents.
The Datadog security lab writeup notes that the library sees about 23 million downloads per week. That's 23 million opportunities every week for a malicious version to spread before anyone notices.
What actually changes your risk profile
Pinning packages is the obvious lesson, but it only helps if you review what you're pinning to. The practical things that make a difference:
Use a lockfile and commit it. pip-compile, poetry.lock, uv.lock. If your lockfile is committed, a supply chain attack shows up as a diff in your pull request. An automated upgrader can't silently swap in a malicious version.
Audit AI tool credentials separately. The Cursor and GitHub Copilot theft is a new angle. These tools have broad access — your codebase, your commit history, sometimes your deployment pipelines. Rotate them on a regular cadence, not just after an incident.
Know what Python is running in your environment. Any machine running Python-based AI tooling is in scope for supply chain attacks. That includes CI/CD runners, developer laptops, and anything running automated workflows.
Seven months between two successful attacks on the same library is a signal, not a coincidence. This ecosystem is actively being targeted. The teams that treat AI tooling dependencies with the same care as production database credentials are the ones that avoid the cleanup call.
If you're not sure what's pinned in your AI stack or whether your team's credentials need rotation, that's a fast audit we run as part of any engagement. Get in touch.