My minute-by-minute response to the LiteLLM malware attack
TL;DR Highlight
Chasing a frozen laptop with Claude Code exposed the LiteLLM supply chain attack within 72 minutes.
Who Should Read
Backend and AI developers worried about dependency security when packages and MCP servers are auto-installed from PyPI via uvx.
Core Mechanics
- The frozen laptop was a supply chain attack
- Cursor ran uvx futuresearch-mcp-legacy, which pulled in litellm 1.82.8 as a dependency.
- That version shipped litellm_init.pth, which runs on every Python startup.
- Child Python processes re-triggered the .pth, causing an 11k-process fork bomb (runaway self-replication).
- Claude first said it wasn't malware
- Its early diagnoses were a runaway Claude Code loop, then a Cursor auto-update issue.
- The author called it 'Claude blaming Claude' and said the initial theory was completely wrong.
- The author says it took healthy skepticism to get Claude to look for malice.
- The malware stole credentials and tried to spread
- It collected SSH keys, AWS/GCP/Azure/K8s credentials, .env files and shell history.
- It tried to send them RSA-encrypted to https://models.litellm.cloud/.
- It also tried to persist via a systemd service at ~/.config/sysmon/sysmon.py and create privileged pods in K8s.
- A forced reboot cut the persistence short
- sysmon.py was created at 11:07 but was 0 bytes.
- The 11:09 force reboot interrupted the write.
- Claude found no malicious pods in the author's K8s cluster.
- The version existed only on PyPI, not GitHub
- It was uploaded to PyPI at 10:52 UTC while GitHub tags stopped at v1.82.6.
- Claude found litellm_init.pth listed with a sha256 hash in the official wheel's RECORD file.
- An isolated Docker download at 11:58 confirmed it was still live on PyPI.
- 72 minutes from first symptom to public disclosure
- Investigation started with Claude Code at 11:13 and the malware was identified at 11:40.
- PyPI security was emailed at 11:58 and LiteLLM at 12:00.
- Claude Code wrote, PR'd and merged the disclosure post in 3 minutes at 12:02.
Community Reactions
- PyPI reacted fast
- A commenter praised PyPI for quarantining the package about 30 minutes after the report.
- Be careful what you hand to agents
- A commenter noted LLM agents have no sense of responsibility, so accidentally running the script would be a fiasco.
- They said sandboxed downloads take only 1-2 commands, so do them yourself.
- Wait 24 hours before upgrading dependencies
- A commenter said they mitigate this with 'wait 24h before dep upgrades', which uv already supports.
- Another said small shops should pin or lock dependencies and wait long enough.
- Keep the model as proposer, with deterministic gates
- A commenter argued the LLM should only propose, with policy gates and audit logs for side-effecting actions.
- The fork bomb helped detection
- A commenter wondered how much longer it would have taken to notice without the 11k-process fork bomb.
- Another said Claude kept saying nothing was wrong and the human had to push it, so next time could be harder.
How to Apply
- Set a minimum age for new dependency versions
- Today, configure CI and local uv so new releases are installed only after 24 hours.
- Check uv's docs for the supported option.
- Commit lockfiles so auto-installed dependencies from uvx are pinned too.
- Audit your MCP servers and uvx launches
- List every server auto-run via uvx or npx in .mcp.json and .cursor/mcp.json.
- Remove unused or broken ones.
- Pin their versions.
- Write an incident checklist for malicious packages
- Document rotating SSH keys, cloud/K8s credentials and .env secrets in order.
- Include purging the uv cache (~/.cache/uv).
- List security@pypi.org and the project's security contact for reporting.
- Restrict agent investigations to read-only and sandboxes
- State in the prompt that suspicious files are downloaded only inside a Docker container.
- Add an explicit do-not-execute rule.
- Require human approval for any command that runs code.
Try It
# Paste into Claude Code or Claude (simplified version of the incident-response flow in the post)
Something odd happened on my Mac: {{symptom, e.g. thousands of python -c exec(base64.b64decode(...)) processes slowed the system}}.
Investigate in this order. Only read files; never execute anything.
1. Check the process tree, system logs, and recently modified site-packages and *.pth files.
2. If a suspicious file exists, print its contents only and explain step by step what it does.
3. Trace which package and version came in and how (uvx, pip, MCP server, etc.) using install logs.
4. Check whether the same version exists in the official repo (e.g. GitHub tags).
5. If a re-download is needed, download only, inside an isolated Docker container, and never run it.
6. List credentials that may be exposed and the order to rotate them.
7. Tell me who to report to (e.g. the PyPI security team) and draft the email.
Even if your first hypothesis says it's not malware, look for contrary evidence and re-verify.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques