Skip to main content
Mallory
← Back to News
package-repository-poisoningcredential-stealer-activityloader-delivery-mechanismpersistence-method

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

Supply Chain Risk · 6 sources · Updated 5mo ago · First seen May 12, 2026

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.

Does this reach your builds?Trace attribution and downstream blast radius.
Trace the chain
Event timeline

How this story unfolded

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

4 events · May 12, 2026
  1. May 12, 20266mo 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.

  2. May 12, 20266mo ago

    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.

  3. May 12, 20266mo ago

    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.

  4. May 12, 20266mo ago

    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, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Affected products

1 linked
Mistralai

Organizations

1 linked
Mistral AI

Observables

4 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

Do you run this?See attribution and downstream blast radius, and whether this package or vendor reaches your builds.
Trace the Supply Chain
Mallory platform

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, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.