Malicious litellm_init.pth in litellm 1.82.8 — credential stealer

Simon Willison's Blog / 3/25/2026

📰 NewsDeveloper Stack & InfrastructureSignals & Early Trends

Key Points

  • LiteLLM v1.82.8 on PyPI was compromised with a malicious credential-stealing payload hidden in a `litellm_init.pth` file, meaning installation alone could trigger data theft without importing the package.
  • The blog notes that v1.82.7 also contained the exploit, but in `proxy/proxy_server.py`, requiring the module to be imported for activation.
  • The attacker exfiltrated a broad range of secrets from common developer credential locations (e.g., `~/.ssh/`, cloud/provider configs, kube/docker/npm credentials, and many shell history files).
  • PyPI quarantined the `litellm` package after discovery, limiting the compromise window to a few hours, and the article links to issue threads describing the stealer behavior and exploit timeline.
  • The incident highlights the risk of supply-chain attacks via PyPI packages and the need for rapid package integrity checks and remediation for anyone who installed the affected version(s).
Sponsored by: WorkOS — The infrastructure fast-growing B2B companies use to sell to Enterprise.

24th March 2026 - Link Blog

Malicious litellm_init.pth in litellm 1.82.8 — credential stealer. The LiteLLM v1.82.8 package published to PyPI was compromised with a particularly nasty credential stealer hidden in base64 in a litellm_init.pth file, which means installing the package is enough to trigger it even without running import litellm.

(1.82.7 had the exploit as well but it was in the proxy/proxy_server.py file so the package had to be imported for it to take effect.)

This issue has a very detailed description of what the credential stealer does. There's more information about the timeline of the exploit over here.

PyPI has already quarantined the litellm package so the window for compromise was just a few hours, but if you DID install the package it would have hoovered up a bewildering array of secrets, including ~/.ssh/, ~/.gitconfig, ~/.git-credentials, ~/.aws/, ~/.kube/, ~/.config/, ~/.azure/, ~/.docker/, ~/.npmrc, ~/.vault-token, ~/.netrc, ~/.lftprc, ~/.msmtprc, ~/.my.cnf, ~/.pgpass, ~/.mongorc.js, ~/.bash_history, ~/.zsh_history, ~/.sh_history, ~/.mysql_history, ~/.psql_history, ~/.rediscli_history, ~/.bitcoin/, ~/.litecoin/, ~/.dogecoin/, ~/.zcash/, ~/.dashcore/, ~/.ripple/, ~/.bitmonero/, ~/.ethereum/, ~/.cardano/.

Posted 24th March 2026 at 3:07 pm

This is a link post by Simon Willison, posted on 24th March 2026.

open-source 298 pypi 43 python 1236 supply-chain 11

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe