LiteLLM on PyPI backdoored as the TeamPCP cascade reaches Python
TeamPCP used credentials harvested from the Trivy compromise to publish trojanised litellm 1.82.7 and 1.82.8 to PyPI on 24 March 2026 (~10:39 and 10:52 UTC). Malicious wheels drop a litellm_init.pth file in site-packages, executing a credential stealer at every Python interpreter start. PyPI quarantined the packages ~40 minutes after publication. Attackers later claimed ~500,000 credentials from this single compromise. LiteLLM averages ~3M daily downloads and ships in ~36% of cloud environments.
Published 24 Mar 2026
Every version named by the advisory is in the scanner, so a lockfile check finds it directly.
- Severity
- Critical
- Type
- Compromise
- Published
- 24 Mar 2026
- Ecosystems
- PyPI
- Threat actor
- TeamPCP
- Detected by
- PyPI Security, JFrog, Microsoft Threat Intelligence
- Also known as
- TeamPCP LiteLLM cascade
- Source
- docs.litellm.ai
Compromise. A legitimate, already-used package, maintainer account, CI pipeline, or release tag was hijacked and a malicious version was published under a name people already depend on.
The full picture
On 2026-03-24 at approximately 10:39 UTC and 10:52 UTC, TeamPCP published trojanised litellm versions 1.82.7 and 1.82.8 to PyPI. Access was obtained using a BerriAI maintainer token harvested from the upstream Trivy compromise on 2026-03-19. PyPI quarantined the releases roughly 40 minutes after the first publication, but litellm averages ~3M daily downloads and is present in an estimated ~36% of cloud environments running LLM workloads, so the practical exposure is large.
Persistence trick
The malicious wheels include a litellm_init.pth file alongside the legitimate code. Python's site module executes .pth files at every interpreter start, so the stealer runs whenever any Python script on the host starts - not only on import litellm. The implant also writes a sysmon.service user systemd unit, drops binaries at /tmp/pglog, and stages payloads in ~/.config/sysmon/.
Capabilities
- Harvests environment variables, SSH keys,
~/.aws/,~/.config/gcloud/, Azure CLI tokens, kubeconfigs, and discovered DB password files. - On detected Kubernetes hosts, deploys privileged pods named
node-setup-*inkube-systemfor cluster-wide lateral movement. - Exfiltrates to
models.litellm.cloud(a typosquat of the legitimatelitellm.ai) withcheckmarx.zoneas fallback.
Scale
TeamPCP later claimed ~500,000 credentials harvested across the broader cascade, with LiteLLM described as the highest-yield single hop because .pth execution snares secrets from any unrelated Python tooling on the same host. PyPI, BerriAI, and JFrog jointly published IoCs and a remediation playbook on 2026-03-24 and 2026-03-25.
1 package 2 versions
These are usually pulled in as transitive dependencies rather than installed directly. Check your whole tree at once. It runs in your browser and nothing is uploaded.
What it does if you installed it
- Env vars, SSH keys, AWS/GCP/Azure credentials, K8s tokens, DB passwords harvested
- .pth file ensures execution on every interpreter init, not only on install
- Privileged K8s pod deployment for cluster-wide lateral movement
- systemd user persistence (sysmon.service)
Clean-up steps
- Downgrade to
litellm≤1.82.6or upgrade to a clean post-incident release - Delete
litellm_init.pthfrom site-packages and rotate every reachable secret - Remove the
sysmon.servicesystemd user unit and/tmp/pglog,~/.config/sysmon/ - Remove rogue
node-setup-*pods inkube-systemand rotate cluster credentials - Block
models.litellm.cloudandcheckmarx.zoneat the network edge
Sources
- LiteLLM Security Update - March 2026 Compromisedocs.litellm.ai
- Detecting, investigating, and defending against the Trivy supply chain compromisemicrosoft.com
- Popular litellm Python package is the latest victim of TeamPCP's ongoing supply chain attackresearch.jfrog.com
Check your lockfile against this and every other incident.
Paste a lockfile and it is matched on your own device against every compromised version we track. Nothing is uploaded and there is no account.