Malicious LiteLLM 1.107.0 on PyPI and Docker Hub runs code on Python startup
A compromised LiteLLM 1.107.0 was published to PyPI and Docker Hub on October 21. A cook.pth file and sitecustomize.py script make the package execute arbitrary code every time the Python interpreter starts. Systems that installed it without version pinning or pulled the latest, main-latest, main-stable or v1.107.0 images should be treated as compromised.
- The malicious release was live on PyPI from 11:39 to 13:23 UTC on October 21
- Docker tags latest, main-latest, main-stable and v1.107.0 were affected from 11:46 to 14:20 UTC
- Presence of cook.pth and sitecustomize.py confirms compromise
- Safe version to reinstall is litellm==1.106.2; rotate all keys
Read next
Security