AI Compass / News
LiteLLM 1.107.0 shipped with malware: how to check whether you are affected
On 21 October, a tampered build of the AI gateway LiteLLM that steals credentials was on PyPI and Docker for about two hours. You are only affected if you installed or pulled it in that window.
Source: Security incident: litellm 1.107.0 (LiteLLM Blog),


What happened: LiteLLM is an open-source Python library with a proxy server. Applications use it to reach many AI providers through one interface, which is why it is called an AI gateway. On 21 October 2026, version 1.107.0 was published with malware that steals credentials and downloads further programs. According to LiteLLM, these builds are affected (times in UTC):
- PyPI:
litellm==1.107.0, available from 11:39 to 13:23, then quarantined - Docker: the tags
v1.107.0,latest,main-latestandmain-stable, on Docker Hub from 11:46 to 14:20, on GitHub’s registry (GHCR) until 13:51 at the latest, including thelitellm-databaseandlitellm-non_rootvariants there
The source code on GitHub does not contain the malware. LiteLLM names version 1.106.2 as safe. Since 24 October there have also been newly signed builds of older versions, including 1.106.3.
What this means: The malware sits in the files cook.pth and sitecustomize.py. Python runs them every time it starts in the affected environment, even if you only call pip. If 1.107.0 ran on a machine with internet access, LiteLLM says to assume that credentials were stolen. Anything reachable from that machine is at risk: the model providers’ API keys stored in the LiteLLM database, master and virtual keys, the database password, cloud roles and secrets in environment variables. According to LiteLLM, you are not affected if you installed a pinned older version from PyPI.
What you can do:
- Check without starting Python: Search the file system for
litellm-1.107.0.dist-info,cook.pthandsitecustomize.py. For Docker, check whether you pulled one of the listed tags on 21 October. A hit confirms the infection. No hit, LiteLLM notes, does not prove the system is clean. - Clean up: If you find the files, delete them from the shell and stop the background process that holds
/tmp/remote_code_loader.lock. Then rebuild the environment or image from scratch, pinned to version 1.106.2. - Rotate credentials: Reissue every key and password that was reachable from the machine, and revoke the old ones.
- Pin versions: Reference packages by exact version number and Docker images by their digest, not by
latest. The security report in the LiteLLM repository recommends the same.
Context: According to the root cause analysis of 23 October, the attack began with an admin key that ended up in a public file on 27 May 2026 and was never revoked. From there the attacker obtained GitHub access and, in the end, the path LiteLLM uses to publish its packages. The lesson applies to small projects too: a key that was published by mistake is only harmless once it has been revoked. LiteLLM gives no download figures, so I have not used numbers from secondary sources.
My workshops show you how to bring AI into your team. See the workshops