Security Update: Mistral AI PyPI Supply Chain Attack — LiteLLM Not Impacted
On May 11, 2026, security researchers at Aikido Security discovered a coordinated supply chain attack dubbed "Mini Shai-Hulud" that published malicious versions of over 170 npm packages and 2 PyPI packages, including mistralai==2.4.6.
LiteLLM is not impacted. We call Mistral's API directly over HTTP via httpx and do not import the mistralai Python SDK anywhere in the codebase.
TLDR;
- LiteLLM does not install or import the
mistralaipackage. We call Mistral's API the same way we call every other provider (viahttpx). The compromised package is never executed in any LiteLLM environment. - No LiteLLM user credentials were at risk from this attack. The malware runs at
import mistralaitime. Since LiteLLM never reaches that import, the payload never fires. - No action is required from LiteLLM users. If you have separately installed
mistralai==2.4.6in the same environment for your own application code, you should follow Mistral AI's guidance immediately.
What happened
TeamPCP published mistralai==2.4.6 to PyPI — a version Mistral AI never released. The package contained a backdoor injected into src/mistralai/client/__init__.py that fires at import time on Linux hosts. When triggered, it downloads a file named transformers.pyz from a hardcoded attacker-controlled IP address (83.142.209.194) and executes it as a detached background process.
The filename was deliberately chosen to resemble Hugging Face's widely used transformers library, giving it cover in ML environments.
The payload functions as a credential stealer, targeting secrets stored on the host — cloud credentials, CI/CD tokens, GitHub access tokens, and API keys. Researchers also found a geofenced destructive branch with a 1-in-6 probability of running rm -rf / on systems detected to be in certain regions.
PyPI has since quarantined the entire mistralai project. The attack was part of a broader campaign that hit TanStack (42 packages), UiPath (65 packages), Guardrails AI, OpenSearch, and others across both npm and PyPI.
What to check if you use LiteLLM
No LiteLLM-specific action is needed. If you want to be thorough:
-
Confirm
mistralaiis not in your environment.pip show mistralaiIf the output shows version
2.4.6, remove it immediately and follow Mistral AI's security advisory. -
Check your environment for the dropper. Look for
/tmp/transformers.pyzon any Linux hosts that hadmistralai==2.4.6installed, and for unexpected outbound connections to83.142.209.194. -
Rotate credentials if you were affected. If
mistralai==2.4.6was installed and imported in your environment, treat all secrets present on that host as compromised: cloud credentials, API keys, CI/CD tokens, and GitHub tokens.
Our broader approach to dependency security
If you discover a security issue in LiteLLM, please report it through our bug bounty program. We pay out for P0 (supply chain) and P1 (unauthenticated proxy access) issues.
References
- Aikido Security — Mini Shai-Hulud Is Back
- The Hacker News — Mini Shai-Hulud Worm Compromises TanStack, Mistral AI, Guardrails AI & More
- Wiz Blog — Mini Shai-Hulud Strikes Again
- Mistral AI Security Advisories
- GitHub Issue #523 — mistralai/client-python
- SafeDep — Mass Supply Chain Attack Hits TanStack, Mistral AI
