Malicious litellm_init.pth in litellm 1.82.8, credential stealer

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Anyone who pip-installed litellm 1.82.7 or 1.82.8 within the few-hour compromise window must assume their SSH keys, cloud credentials and shell histories were stolen and rotate everything immediately.

Read this as

LiteLLM, a popular open-source Python package for talking to AI models, was briefly replaced on PyPI (the main download site for Python packages) with a version containing a credential stealer. Installing it was enough to trigger the theft, no importing or running needed. The malicious code stole dozens of secret files, including SSH keys, cloud logins for AWS and Azure, crypto wallets and browser shell history. Only people who installed versions 1.82.7 or 1.82.8 during the few hours before PyPI quarantined the package are affected.

A supply chain attacker stole LiteLLM's PyPI publishing credentials, apparently via the recent Trivy CI compromise, Trivy being the security scanner LiteLLM itself uses, and published versions 1.82.7 and 1.82.8 containing a credential stealer. PyPI quarantined the package after a few hours, but anyone who installed those versions during the window should treat SSH keys, AWS, Azure, Kubernetes and Docker credentials as compromised. Incident response and credential rotation are the immediate cost; LiteLLM's entire user base carries the reputational fallout.

The payload was base64-encoded in a litellm_init.pth file, so the .pth auto-import mechanism executed it at install time without needing 'import litellm'; version 1.82.7 held equivalent code in proxy/proxy_server.py, requiring import to fire. The stealer exfiltrates ~/.ssh, ~/.aws, ~/.kube, ~/.config, ~/.docker, npm and vault tokens, database passwords, shell histories and cryptocurrency wallet directories. Attack chain: the Trivy-action supply chain compromise likely yielded PyPI credentials, used to push the trojaned packages directly.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

LiteLLM PyPI Trivy litellm_init.pth litellm 1.82.8

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading