LiteLLM Compromised Again: Credential Stealer and Backdoor

Last Updated: 2026-10-21T18:41:47Z

What’s Happening

LiteLLM has been compromised again. litellM 1.107.0 on PyPI has a credential stealer and a backdoor. The official litellM 1.107.0 Docker image is also affected. Both of these run when any python process is ran, regardless of if they import litellm or not. Versions 1.106.2, 1.107.0rc1, and 1.107.0rc2 are not compromised, nor are the pinned companion packages litellm-proxy-extras==0.4.110 & litellm-enterprise==0.1.78. PyPI has removed 1.107.0, and Docker Hub has removed the 1.107.0 image. It’s not clear whether TeamPCP is behind this compromise.

SafeDep assesses, with moderate to high confidence, that BerriAI’s private release pipeline built these wheels from an attacker-modified git source. The attacker could have used a compromised maintainer or bot credential, a private branch or mirror, or the reference the pipeline builds from. A stolen PyPI token used from the attacker’s own machines fits the evidence less well. Only BerriAI’s pipeline logs can confirm the cause.

Actions

Follow the remediation steps by JFrog here, and most importantly do not run any python in an affected environment.

Additionally, you can follow the issue directly here, and follow their remediation steps:

Observables

Both SafeDep and JFrog have IoCs available in their writeups. IoCs have been added to our public MISP feed as well.

Notes

  • The tag v1.107.0 points to commit 66c8f5b (06:59 UTC). Its pyproject.toml says version = "1.108.0"

  • Installing litellm==1.107.0 places three files in site-packages. Python loads two of them each time it starts.

    • cook.pth imports cook.py, the credential stealer. Json results are encrypted, compressed, and POSTed to www.litellm[.]dev/healthcheck. After uploading it writes to /tmp/.pc_once_72129118c59f5636c0bbso as to only collect once per host.
    • sitecustomize.py starts a background daemon that reads a server address from a txtfile hosted on github (easily modifiable by the attacker), runs the stealer again, downloads other code to run from the server address in the txtfile.
      • The github account hosting the txtfile now 404s, so the backdoor does nothing, but hosts that ran the backdoor could have ran second-stage code in the window the account and file were still up.

Other Links

1 Like