2 год тому
Software supply chain alert: trojanized LiteLLM release on PyPI siphons keys and cloud credentials, reportedly "steals millions in crypto"
A malicious build of the widely used Python package LiteLLM briefly appeared on PyPI, where a routine "pip install litellm" could trigger broad credential theft on affected machines.
The tainted releases, v1.82.7 and v1.82.8, abused Python's .pth mechanism to execute on every interpreter startup, even if LiteLLM was never imported. The malware targeted high-value secrets, including SSH keys; cloud credentials for AWS, GCP and Azure; Kubernetes configuration and cluster secrets; API keys, .env files and CI/CD secrets; Git credentials and database passwords; shell history and crypto wallets. Stolen data was collected, encrypted, and exfiltrated to attacker-controlled infrastructure.
LiteLLM is downloaded about 97 million times per month, and the biggest exposure stemmed from transitive dependencies. Projects that pull it in indirectly, such as via "pip install dspy", could also be impacted, sharply widening the potential blast radius.
Although the attack window was under an hour, it was only uncovered because of a bug in the malware itself. A recursive fork bomb reportedly crashed a developer's machine, drawing attention to the compromise. Without that defect, the campaign could have persisted for days or weeks.
Investigators describe a three-stage payload: (1) collection of sensitive files, environment variables, and cloud metadata; (2) exfiltration via an AES-256 and RSA encrypted archive sent outbound; (3) persistence attempts, including Kubernetes takeover and system-level backdoors. In Kubernetes environments, it tried to deploy privileged pods across nodes, mount host filesystems, and establish durable access.
The packages were uploaded directly to PyPI without a corresponding GitHub release, pointing to a compromised maintainer account or leaked API token. Related research links the incident to a wider campaign targeting open-source infrastructure. During the episode, a GitHub issue thread was briefly flooded with bot spam and then closed, fueling concerns about maintainer compromise.
The malicious versions have since been removed from PyPI, but the impact may already be material. Early reports cite real financial losses, including claims of millions in stolen cryptocurrency, according to Brian Roemmele.