Litellm PyPI Breach - Malicious Code Steals Credentials
Basically, a popular coding tool got hacked, stealing secret keys from many users.
A serious breach of the litellm PyPI package has put millions at risk. Malicious code has stolen cloud credentials and Kubernetes secrets. Immediate action is required to secure your systems.
What Happened
The litellm Python package was compromised on the Python Package Index (PyPI). Versions 1.82.7 and 1.82.8 contained malicious code designed to steal cloud credentials, SSH keys, and Kubernetes secrets. If you updated your environment on or after March 24, 2026, you should assume your keys are no longer secure. The breach was discovered when users experienced unexpected crashes due to a bug in the malware that created an endless loop of processes, effectively acting as a fork bomb.
The attackers hijacked maintainer accounts for the litellm project, bypassing standard GitHub protocols to push compromised versions directly to PyPI. Given that litellm is a dependency for numerous AI-related projects, the impact is extensive. With over 3.4 million downloads in just one day, many organizations could be at risk.
Who's Affected
Any organization that uses the litellm package in their software stack is potentially affected. This includes developers working on AI applications, as litellm serves as a bridge to various major LLM endpoints. The scale of the breach is staggering, with millions of downloads making it likely that many teams have integrated this package into their environments. If your engineering team builds anything related to AI, it’s almost certain that litellm is part of your codebase.
What Data Was Exposed
The malicious versions of litellm are specifically designed to extract sensitive information. This includes:
- Cloud credentials: Secrets for AWS, GCP, and Azure services.
- SSH keys: These can provide unauthorized access to servers.
- Kubernetes secrets: The malware can escalate privileges and take over entire clusters if it detects service account tokens.
Once compromised, the malware can execute commands that lead to data encryption and exfiltration to attacker-controlled servers, significantly increasing the risk of data breaches.
What You Should Do
If you suspect that your environment has been compromised, take immediate action:
- Purge the environment: Search for and remove any instances of litellm, especially files like litellm_init.pth.
- Rotate credentials: Change all SSH keys, cloud provider credentials, and database passwords immediately.
- Audit your Kubernetes clusters: Look for any suspicious activity or unauthorized pods.
- Block outbound traffic: Prevent any connections to known malicious domains associated with the attack.
Don't wait for a vendor alert; act now to mitigate the damage. Security is a shared responsibility, and proactive measures are essential to safeguard your infrastructure.
Trend Micro Research