On Oct 21, 2026, LiteLLM said version 1.107.0 on PyPI was malicious. This kit checks your machines for it and stops your coding agent from pulling an unpinned package next time. Background: LiteLLM 1.107.0 was compromised: how to check your machines.
Preview: check_litellm_1_107_0.py
# Run with -S so .pth files and sitecustomize.py are not loaded
python3 -S -I scripts/check_litellm_1_107_0.py ~/code ~/venvs --docker
# Exit codes: 0 = no indicators, 1 = indicators found, 3 = run without -S
It checks for litellm-1.107.0.dist-info, cook.pth, cook.py, an unexpected sitecustomize.py, their __pycache__ copies, the /tmp/remote_code_loader.lock lock file and, with --docker, local images whose digests start with the prefixes in the incident post.
What's inside
scripts/check_litellm_1_107_0.py: the read-only indicator check
.claude/hooks/block-unpinned-installs.py: blocks pip install litellm, allows pip install litellm==1.106.2
.claude/settings.json: registers the hook for the Bash tool
.npmrc: save-exact=true, so npm saves 1.2.3 instead of ^1.2.3
tests/test_kit.py: 19 blocked and 20 allowed commands, plus scanner tests on clean and fake infected folders
README.md: setup and limits
How to use it
- Unzip the kit.
- Run
python3 -S -I scripts/check_litellm_1_107_0.py with the folders that hold your projects and virtualenvs.
- Copy
.claude/ into your project root. Merge the hooks key if you already have a settings file.
- Type
/hooks in Claude Code to check the hook is listed.
- Test it: ask Claude to run
pip install litellm. It should be blocked.
- Optional: run
python3 -m unittest discover -s tests -v.
Who it's for
Anyone who had LiteLLM in a project, and anyone who lets a coding agent install packages.