A critical security incident involving the LiteLLM Python package has underscored the vulnerabilities within the LLM dependency supply chain. Versions 1.82.7 and 1.82.8, downloaded over 95 million times monthly, were compromised on the Python Package Index (PyPI). These malicious versions contained a payload designed to exfiltrate a wide range of sensitive data, including SSH keys, cloud provider credentials, Kubernetes secrets, API keys, crypto wallets, and database passwords, sending them to an attacker-controlled server. The incident highlights the significant risk posed when the distributed package diverges from its source code, a threat amplified in the context of LLM gateway libraries that inherently manage numerous API keys. The full details and security recommendations are available on the Mozilla Blog.
The Attack Vector
The threat actor group TeamPCP gained access to LiteLLM maintainer's PyPI publishing credentials. This allowed them to upload compromised versions directly to PyPI, circumventing any security checks on the project's GitHub repository. The payload utilized a .pth file, a Python mechanism that auto-executes code upon interpreter startup, meaning the malware could run simply by having the package installed, without any explicit import statement.
