Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Back to intelligence
package-repository-poisoningcredential-stealer-activitypersistence-methodloader-delivery-mechanism

Compromised `mistralai` PyPI Package Deployed Linux Credential-Stealing Malware

Updated 1mo agoFirst seen May 12, 20266 sources

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.

Share:
Compromised `mistralai` PyPI Package Deployed Linux Credential-Stealing Malware
Stay ahead

Get ahead of threats like this

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.

EVENT TIMELINE

How this story unfolded

4 events from the most recent confirmed update back to the earliest known activity.

4 EVENTS
May 12, 20261mo ago

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.

LINKED ENTITIES

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

12 LINKEDOpen in app
Affected products
1 linked
Transformers
Organizations
9 linked
Mistral AIHugging FaceMicrosoft CorporationTanstackAikido SecuritySolarWindsVercel3cxGoogle
The operational view lives in Mallory

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t — which of your assets are affected, which threat actors are using it right now, which detections to deploy, and what to do next.
Exposure mapping

Map indicators from this story to your assets and identify affected systems in minutes.

Threat actor evidence

Every observed campaign, victim, and pivot linked to actors named in this story.

Associated malware

Malware, exploits, and IOCs connected to the activity described here.

Detection signatures

YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.

Scheduled alerts

Get matching new stories delivered to your team as they break — not the next morning.

AI threads

Ask questions about this story and take action on the answers.