PyPI

The LiteLLM PyPI Supply Chain Attack

Updated 18 Nov 2026 · Incident date 24 Mar 2026

litellm 1.82.7 and 1.82.8 on PyPI held a three-stage credential stealer that started every time Python ran, published by TeamPCP on 24 March 2026.

Version 1.82.6 is the last clean release, according to BleepingComputer. The attack followed the Trivy compromise five days earlier.

What happened

The attackers stole the LiteLLM PyPI publishing token and published two poisoned versions.

  • LiteLLM's CI ran the Trivy GitHub Action without a pinned version. The poisoned action read the PYPI_PUBLISH token from the runner.
  • The attackers published to PyPI directly. The malicious code was absent from the GitHub source.
  • Version 1.82.7 added a base64 blob to litellm/proxy/proxy_server.py. Version 1.82.8 added litellm_init.pth, which runs at every Python start.
  • The code sent SSH keys, cloud and Kubernetes credentials, .env files, TLS keys, CI secrets and crypto wallets to models.litellm.cloud.
  • It then installed a systemd backdoor that polls checkmarx.zone/raw every 50 minutes.

The attackers published 1.82.7 at 10:39 UTC and 1.82.8 at 10:52 UTC on 24 March 2026. PyPI quarantined both after about three hours.

Affected versions

  • litellm 1.82.7 (malicious).
  • litellm 1.82.8 (malicious).
  • litellm 1.82.6 is the last clean release.
  • Treat any machine that ever had 1.82.7 or 1.82.8 as compromised.

Indicators of compromise

  • SHA-256 of litellm_init.pth: 71e35aef03099cd1f2d6446734273025a163597de93912df321ef118bf135238.
  • Domains: models.litellm.cloud and checkmarx.zone.
  • Archive name: tpcp.tar.gz.
  • Files: ~/.config/sysmon/sysmon.py, ~/.config/systemd/user/sysmon.service, /tmp/pglog, /tmp/.pg_state.
  • Kubernetes pods named node-setup-<node name> in kube-system.

How to check

Use a shell outside the affected Python environment. Replace the path with that environment’s location.

find /path/to/environment \( -name 'litellm-*.dist-info' -o -name 'litellm_init.pth' \) -print

Check for the unexpected service and files on the host.

ls -l ~/.config/sysmon/sysmon.py ~/.config/systemd/user/sysmon.service /tmp/pglog /tmp/.pg_state
systemctl --user status sysmon.service

Check CI build logs and lockfile history for past installs. A clean install today cannot rule out earlier exposure.

What to do now

  1. Isolate affected hosts and runners. Stop the unexpected service before you reuse the host.
  2. Rebuild from a clean release. Review cached builds and follow LiteLLM’s recovery guidance for Kubernetes.
  3. Use a clean machine to rotate credentials the affected host or runner can read.
  4. Block models.litellm.cloud and checkmarx.zone at the firewall or DNS resolver.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `litellm` 1.82.7. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

litellm 1.82.7

An AI gateway gained hidden code that stole cloud keys and login files, and started itself every time Python ran.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Is uninstalling LiteLLM enough?

No. The malware leaves a systemd service and can leave pods in kube-system. Remove those, then rotate every credential.

Which LiteLLM versions were compromised?

Versions 1.82.7 and 1.82.8. Version 1.82.8 added the file that runs at every Python start.

How can I stop the next PyPI attack?

Pin GitHub Actions by commit SHA. Pin Python packages to exact versions in a lock file.

Sources

  1. docs.litellm.ai/blog/security-update-march-2026
  2. bleepingcomputer.com/news/security/popular-litellm-pypi-package-compromised-in-teampcp-supply-chain-attack/
  3. research.jfrog.com/post/litellm-compromised-teampcp/
  4. snyk.io/blog/poisoned-security-scanner-backdooring-litellm/
  5. endorlabs.com/learn/teampcp-isnt-done
  6. microsoft.com/en-us/security/blog/2026/03/24/detecting-investigating-defending-against-trivy-supply-chain-compromise/

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · What is a supply chain attack? · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library