Explainer

The LiteLLM supply chain attacks of 2026: what happened and what to check

LiteLLM versions 1.82.7, 1.82.8 and 1.107.0 shipped credential-stealing malware in 2026. Timeline, affected versions, how to check, and what to rotate.

LiteLLM was compromised twice in 2026. On 24 March, versions 1.82.7 and 1.82.8 were published to PyPI with credential-stealing malware. On 21 October, version 1.107.0 was published to PyPI and Docker with similar malware. Both were removed within hours. If you installed or ran any of these versions, treat that environment as compromised and rotate its secrets.

Facts from LiteLLM's and Snyk's incident reports, checked on 2 December 2026. This page lists facts only; follow the linked reports for full technical detail.

Affected versions at a glance

IncidentAffected artifactsWindow (UTC)Safe to pin
March 2026PyPI litellm 1.82.7 and 1.82.824 Mar, 10:39 to about 13:381.82.6 or earlier
October 2026PyPI litellm 1.107.021 Oct, 11:39 to 13:231.106.2
October 2026Docker Hub v1.107.0, latest, main-latest, main-stable21 Oct, 11:46 to 14:20A pinned, verified earlier tag
October 2026GHCR images for the same tags21 Oct, 11:46 to 13:51A pinned, verified earlier tag

Sources: Snyk, LiteLLM.

March 2026: the Trivy route

According to Snyk's analysis:

  • On 19 March, attackers rewrote tags of the Trivy GitHub Action, an open-source security scanner, to point to a malicious release.
  • LiteLLM's CI pipeline used that action, which gave the attackers LiteLLM's PyPI publishing credentials.
  • On 24 March they published 1.82.7 at 10:39 UTC and 1.82.8 at 10:52 UTC. PyPI quarantined the package about three hours later.
  • The payload used a .pth file, which Python runs on every interpreter start. It harvested credentials, exfiltrated them encrypted and installed a persistent backdoor.
  • It was found by Callum McMahon at FutureSearch, whose machine ran out of memory shortly after the package was pulled in as a dependency.

PyPI's later incident report counted more than 119,000 downloads of the bad versions. For scale, Snyk noted LiteLLM is downloaded roughly 3.4 million times a day.

After March, LiteLLM says it moved releases to a private repository with trusted publishers, made Docker tags immutable and started signing images.

October 2026: a leaked key, then the release workflow

LiteLLM's canonical attack chain report, published on 23 October, replaces its earlier status updates. According to it:

  • 27 May 2026: an administrative key for an internal LiteLLM service was committed to a public repository. The file was deleted about three hours later, but the key was never revoked and the commit stayed in the repository's history.
  • 10 October: the attacker used that key to take over the internal service, which held the GitHub CLI token of a GitHub organisation owner. That gave the attacker owner-level access.
  • Next: the attacker ran workflows that exfiltrated more secrets, including GitHub tokens of two maintainers.
  • 21 October: the attacker changed the private release workflow so it could build from another source. Branch protection rejected the change, so the owner's token was used to push it anyway. The workflow then built release 1.107.0 from a lookalike fork, Berri-AI/litellm, instead of BerriAI/litellm. A rule relaxed that week, letting any two engineers trigger and approve a release, let the attacker use two stolen identities to do both.
  • 11:39 UTC: the malicious wheels reached PyPI. Docker images followed at 11:46. The official source tag never contained the malicious files.

The payload was compiled malware that steals credentials and loads remote-code execution tools, using files named cook.pth and sitecustomize.py (incident post). LiteLLM said Enterprise customers pulling from its private registry were not affected. Since 15 November 2026, starting with v1.111.0-dev.3, LiteLLM signs releases with keyless cosign.

How to check if you were affected

March versions:

  1. Check installed versions everywhere LiteLLM runs, including as a dependency of other tools: pip show litellm.
  2. Look in lockfiles and build logs from 24 March for 1.82.7 or 1.82.8.

October version, from LiteLLM's guidance:

  1. If any environment started Python with litellm==1.107.0, treat it as compromised.
  2. If a container ran image digest sha256:1bbcb1443bc9... (full digest in LiteLLM's post), treat it as compromised.
  3. Search for litellm-1.107.0.dist-info, cook.pth and sitecustomize.py. Finding one confirms exposure; not finding one does not prove the environment is clean.

What to do if you were affected

LiteLLM's steps for the October version:

  1. Don't run pip install first. Any Python start re-runs the malicious files. Delete cook.pth, cook.py, sitecustomize.py and matching cached files from every affected site-packages directory from the shell.
  2. Stop the detached Python process the malware started.
  3. Rebuild environments and images from scratch, pinned to a known-good version.
  4. If the host had outbound internet access, assume credentials were stolen.
  5. Rotate everything the host could reach: cloud roles, every provider key stored in the LiteLLM database, LiteLLM master and virtual keys, the database password, and any secret in the environment of any process on that host.
  6. Check your cloud audit logs for use of those credentials from outside your infrastructure.

That fifth step is the one that hurts. A gateway holds every provider key your company uses, so a compromised gateway exposes all of them at once.

Lessons for anyone running an AI gateway

These apply to any gateway, not just LiteLLM:

  • Pin exact versions and never deploy latest automatically.
  • Verify signatures and digests on images before you run them.
  • Keep provider keys in a secret manager, and know how to rotate all of them in an hour.
  • Limit outbound network access from the gateway host to the providers it actually calls.
  • Watch your dependencies. The March versions reached people who never installed LiteLLM directly.

Should you keep using LiteLLM?

LiteLLM responded quickly both times, published detailed reports and changed its release process, and it remains one of the most used open-source gateways. If you keep it, pin and verify. If the incidents are a reason to review your gateway, see LiteLLM alternatives, Bifrost vs LiteLLM and AI Gateway vs LiteLLM.

Questions

Which LiteLLM versions were compromised?

PyPI versions 1.82.7 and 1.82.8 on 24 March 2026, and version 1.107.0 on PyPI and Docker (including the latest, main-latest and main-stable tags) on 21 October 2026.

Is LiteLLM safe to use now?

The compromised versions were removed and LiteLLM changed its release process, including keyless image signing since November 2026. Pin exact versions and verify image signatures before upgrading.

Were LiteLLM Enterprise customers affected?

In October, LiteLLM said Enterprise customers pulling from its private registry were not affected. The March incident affected the public PyPI package.

What should I rotate after a LiteLLM compromise?

Every secret the host could reach: provider API keys stored in LiteLLM, LiteLLM master and virtual keys, the database password, cloud roles, and environment secrets of any process on the host.

More posts

Keep reading.

See how AI Gateway fits your setup.

Tell us what you run today and how many people need access. We'll get back to you to learn more about your setup.

See how AI Gateway fits your setup.

What do you run today?