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.

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
4 events from the most recent confirmed update back to the earliest known activity.
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.
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.
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.
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.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
6 references tracked. Mallory keeps watching after this page renders.
cvereports.com
Open sourcetomshardware.com
Open sourcecybersecuritynews.com
Open sourcedocs.mistral.ai
Open sourcegithub.com
Open sourcegithub.com
Open sourceMap 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.