Compromised `mistralai` PyPI Package Deployed Linux Credential-Stealing Malware
Microsoft Threat Intelligence warned that version 2.4.6 of the widely used mistralai package on PyPI was compromised in a software supply-chain attack, with malicious code inserted into mistralai/client/__init__.py. The code executed on import, retrieved a second-stage payload from a remote server, and deployed malware on Linux systems. The payload was written to /tmp/transformers.pyz to resemble legitimate Hugging Face tooling, while additional components including pgmonitor.py and a persistent systemd service named pgsql-monitor.service were used to blend into developer and database-monitoring environments. Microsoft said the malware primarily targeted credentials and persistence, with the potential to expose GitHub tokens, cloud API keys, SSH keys, npm credentials, and CI/CD secrets.
Researchers said the intrusion may be tied to the broader Mini Shai-Hulud campaign, which has also been associated with compromised TanStack packages and multiple Mistral npm SDK packages, suggesting an expanding effort against developer ecosystems and trusted package repositories. The malware also contained geo-aware logic, including a destructive branch that could trigger system wiping on hosts appearing to be in Israel or Iran, while avoiding Russian-language systems. Microsoft urged defenders to isolate affected Linux hosts, block outbound connections to the malicious infrastructure, hunt for indicators including /tmp/transformers.pyz, pgmonitor.py, and pgsql-monitor.service, and rotate any credentials that may have been exposed.

Get ahead of threats like this
Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
How this story unfolded
4 events from the most recent confirmed update back to the earliest known activity.
Researchers link incident to broader 'Mini Shai-Hulud' supply-chain campaign
Researchers said the mistralai compromise may be connected to the broader 'Mini Shai-Hulud' campaign, which has also been associated with compromised TanStack JavaScript packages and multiple Mistral npm SDK packages. The campaign appears aimed at harvesting high-value developer and cloud credentials from trusted software ecosystems.
Microsoft discloses and investigates the mistralai package compromise
On May 12, 2026, Microsoft Threat Intelligence reported it was investigating the compromised mistralai 2.4.6 package and published technical details of the malicious behavior. Microsoft assessed the payload as primarily a credential stealer and warned defenders to isolate affected Linux hosts, block the malicious IP, hunt for indicators, and rotate exposed credentials.
Malicious payload targets Linux systems for credential theft and persistence
The second-stage malware downloaded as /tmp/transformers.pyz targeted Linux environments, stealing credentials and establishing persistence via files including pgmonitor.py and a systemd service named pgsql-monitor.service. The malware also contained geo-aware destructive logic that could wipe systems appearing to be in Israel or Iran while avoiding Russian-language systems.
Attackers publish compromised mistralai 2.4.6 package to PyPI
The PyPI package mistralai version 2.4.6 was compromised in a software supply-chain attack. Malicious code was inserted into mistralai/client/__init__.py so it would execute on import and fetch a second-stage payload.
Related entities
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Sources
6 references tracked. Mallory keeps watching after this page renders.
GHSA-JGG6-4RPR-WFH7: GHSA-JGG6-4RPR-WFH7: Mistral AI SDK Supply Chain Compromise via Mini Shai-Hulud Worm | CVEReports
cvereports.com
Open sourceCompromised Mistral AI and TanStack packages may have exposed GitHub, cloud and CI/CD credentials in 'mini Shai Hulud' malware infection - supply-chain campaign spreads across npm and AI developer ecosystems like wildfire | Tom's Hardware
tomshardware.com
Open sourcemistralai PyPI package Compromised to Inject Malicious Code - Microsoft Warns
cybersecuritynews.com
Open source[SECURITY] Supply chain compromise in mistralai 2.4.6 - backdoor downloads and executes payload from hardcoded IP · Issue #523 · mistralai/client-python
github.com
Open sourceMalicious dropper in mistralai 2.4.6 PyPI package · Advisory · mistralai/client-python · GitHub
github.com
Open sourceSecurity advisories | Mistral Docs
docs.mistral.ai
Open sourceSee the full picture, correlated to your attack surface.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.


