On March 24, 2026, Callum McMahon at FutureSearch was testing a Cursor MCP plugin that pulled in litellm as a transitive dependency. Shortly after, his machine became unresponsive. He traced it to a newly installed litellm package.
What Is LiteLLM?
LiteLLM is a Python library that works like a universal remote for AI APIs. 95 million downloads per month on PyPI. ~40,000 GitHub stars.
The Attack Chain
sequenceDiagram
participant A as Attacker (TeamPCP)
participant T as Trivy GitHub Repo
participant CI as LiteLLM CI (GitHub Actions)
participant P as PyPI Registry
Note over A,T: March 1 - Initial CompromiseA->>T: Submit malicious PR (Pwn Request)T-->>A: CI leaks personal access tokenNote over CI,P: March 24 - Package TakeoverCI->>T: Pull trivy-action@latest (not pinned to SHA)T-->>CI: Serve compromised actionCI-->>A: Leak PyPI publisher tokenA->>P: Publish litellm v1.82.7 (inline payload)A->>P: Publish litellm v1.82.8 (.pth persistence)</code></pre></figure>
graph LR
A["Trivy Repo\n(compromised)"] --> B["GitHub Bot Army"]
B --> C["PyPI Account Takeover"]
C --> D["LiteLLM v1.82.7 / v1.82.8"]
D --> E[".pth Backdoor"]
E --> F["Credential Harvest"]
F --> G["Exfil Server (ICP Canister)"]
What the Malware Does
The payload was triple-nested: a base64 blob decodes to an orchestrator script, which decodes a second base64 blob containing the harvester.
If anything shows up, upgrading the package is not enough. Rotate all LLM provider API keys, cloud credentials, GitHub and PyPI tokens, CI/CD secrets, and SSH keys. Rebuild from known-good images. The last known-clean version is 1.82.6.