Contents
Tags
On March 24, 2026, two versions of LiteLLM on PyPI were replaced with malware that silently stole every API key, SSH key, cloud credential, and crypto wallet on the machine. The attack ran for ~9 hours and reached millions of daily downloads. Paste your pip freeze output below to check if you were affected.
Paste the output of pip freeze or pip list below, then click Check.
# 1. Check your installed version
pip show litellm | grep Version
# 2. Look for the malicious .pth launcher
python -c "import site; print('\n'.join(site.getsitepackages()))"
# Check each path printed above for litellm_init.pth
# 3. Look for the persistence backdoor
ls ~/.config/sysmon/sysmon.py 2>/dev/null && echo "BACKDOOR FOUND"
systemctl --user status sysmon 2>/dev/null
# 4. Check network logs for C2 traffic
grep -r "models.litellm.cloud\|83.142.209.11" /var/log/ 2>/dev/nullA compromise of this severity cannot be patched in place. The attacker had full read access to your environment variables, SSH keys, cloud credentials, and shell history the moment Python started. Every credential must be treated as stolen.
#!/bin/bash
# Step 1 — Remove malicious .pth file
for dir in $(python -c "import site; print(' '.join(site.getsitepackages()))"); do
rm -f "$dir/litellm_init.pth"
echo "Cleaned: $dir"
done
# Step 2 — Remove persistence backdoor
rm -rf ~/.config/sysmon/
systemctl --user disable --now sysmon 2>/dev/null
# Step 3 — Downgrade to safe version
pip install litellm==1.82.6
# Step 4 — Verify
pip show litellm | grep Version
python -c "import litellm; print('litellm OK')"The attacker (TeamPCP) did not compromise LiteLLM directly. They first breached Trivy — a widely-used CI/CD security scanner — and stole LiteLLM's PyPI publishing credentials from its pipeline. The two poisoned versions were uploaded without any corresponding GitHub release tags, which was the key forensic signal. The 1.82.8 variant was particularly dangerous: it installed a .pth file that Python auto-executes on every interpreter start, meaning the credential harvester ran in every Python process on the machine regardless of whether litellm was ever imported.
Red flag for future attacks: if a PyPI package version has no matching GitHub release tag, do not install it. Legitimate maintainers tag before publishing.
LiteLLM is popular because it provides a single proxy to dozens of AI cloud providers — but that means it also aggregates dozens of API keys in one place, making it a high-value target. If you run local models on your own hardware, you reduce how many cloud API keys need to exist in your environment at all. Tools like runyard.dev help you match models to your exact GPU and RAM so you can move workloads fully on-device. Fewer secrets on disk means a smaller blast radius when supply chain attacks like this one land.
Tools
Paste pip freeze output to scan for compromised litellm versions.
Newsletter