May 18, 2026·5 min read·58 visits
Mistral AI's official NPM and PyPI packages were compromised by the Mini Shai-Hulud worm via a developer's stolen session tokens. Malicious package versions containing secondary dropper scripts were published, requiring immediate dependency auditing and secret rotation.
A significant supply chain compromise affected official Mistral AI software development kits (SDKs) on both NPM and PyPI ecosystems. The incident involved an automated worm known as 'Mini Shai-Hulud' that leveraged stolen maintainer credentials to publish malicious packages containing secondary dropper payloads.
The vulnerability represents a direct supply chain compromise affecting the official software development kits published by Mistral AI. The attack surface encompasses developer workstations, CI/CD pipelines, and any downstream systems consuming the affected dependencies from the NPM and PyPI registries.
The impacted components include multiple @mistralai scoped packages on NPM, specifically @mistralai/mistralai, @mistralai/mistralai-azure, and @mistralai/mistralai-gcp. A parallel compromise occurred in the Python ecosystem, affecting the mistralai package version 2.4.6 on PyPI.
The root cause was not a flaw in the Mistral SDK codebase itself, but rather the compromise of the software distribution pipeline. An automated worm utilized stolen authentication tokens to masquerade as an authorized maintainer, subverting the trust controls inherent in package management ecosystems.
The initial vector of the compromise traces back to a third-party developer ecosystem. The automated worm, designated 'Mini Shai-Hulud', originally targeted maintainers of the TanStack project. The worm acquired access to developer environments by stealing authentication tokens and session cookies associated with NPM and PyPI registries.
A Mistral AI developer held maintainer privileges for both the targeted third-party libraries and official Mistral AI repositories. The worm compromised this specific developer's local environment, granting the malware administrative access to Mistral's package publishing pipeline.
Once the local environment was compromised, the worm autonomously enumerated all packages for which the infected developer possessed publishing rights. It then initiated automated uploads of new package versions containing the embedded malicious payload, bypassing manual code review processes.
The injected payload varied in functionality depending on the target ecosystem. The malicious code published to the @mistralai NPM packages functioned as a dropper, designed to fetch and execute a secondary payload from a remote command-and-control server.
Analysis from multiple security vendors confirmed that the NPM variant of the dropper was broken. Execution failures within the post-install script prevented the final malware stage from running successfully on many victim machines. This execution failure mitigated the immediate technical impact for NPM consumers.
Conversely, the PyPI payload embedded within mistralai==2.4.6 was fully functional. This variant successfully executed its primary objectives, which included credential exfiltration and the subsequent propagation of the worm to newly infected developer environments.
The attack methodology relies entirely on subverting developer trust and manipulating package manager behaviors. The worm hooks into the installation phase of the package lifecycle. For NPM, this typically involves defining a preinstall or postinstall script within the malicious package.json.
When a victim executes a standard installation command, the package manager inadvertently triggers the worm's bootstrap script. The script immediately attempts to spawn a hidden shell process to execute encoded instructions or initiate network connections to external infrastructure.
The fully functional PyPI payload actively scans the local environment for configuration files, environment variables, and SSH keys. It targets high-value secrets, particularly authentication tokens that allow the worm to authenticate against version control systems and package registries to continue its lateral movement.
Successful execution of the functional payload results in a total loss of confidentiality and integrity for the infected environment. The attacker gains the capability to execute arbitrary code with the privileges of the user invoking the package manager.
The primary objective of the payload is credential theft. Any secrets, API keys, or environment variables present on the compromised system must be considered compromised. Specifically, the MISTRAL_API_KEY is at high risk of exfiltration, leading to unauthorized resource consumption and potential data exposure on the Mistral AI platform.
Forensic investigations by Mistral AI concluded that their internal infrastructure and production systems were not compromised during this incident. The blast radius was strictly limited to systems consuming the affected package versions published via the single compromised developer account.
Immediate remediation requires verifying installed package versions across all projects. Development and security teams must audit package.json, package-lock.json, and requirements.txt files for any @mistralai scoped dependencies or the mistralai Python package updated around May 12, 2025.
If compromised versions are identified, they must be removed, and systems updated to the latest available clean versions published after the incident. Developers must forcefully purge local package caches to prevent accidental re-installation of the malicious artifacts.
# Purge NPM cache forcefully
npm cache clean --force
# Reinstall dependencies
npm installCredential rotation is mandatory for any environment that executed the compromised packages. Administrators must immediately revoke and reissue all secrets, API keys, and specifically any MISTRAL_API_KEY instances that were accessible to the affected system during the vulnerability window.
| Product | Affected Versions | Fixed Version |
|---|---|---|
@mistralai/mistralai Mistral AI | Versions published ~May 12, 2025 | Latest post-May 12 versions |
@mistralai/mistralai-azure Mistral AI | Versions published ~May 12, 2025 | Latest post-May 12 versions |
@mistralai/mistralai-gcp Mistral AI | Versions published ~May 12, 2025 | Latest post-May 12 versions |
mistralai (PyPI) Mistral AI | == 2.4.6 | Latest post-May 12 versions |
| Attribute | Detail |
|---|---|
| Attack Vector | Supply Chain Compromise |
| CWE ID | CWE-506 |
| Impact | Credential Theft / Arbitrary Code Execution |
| Vulnerable Packages | @mistralai/* (NPM), mistralai (PyPI) |
| Threat Actor / Malware | Mini Shai-Hulud Worm |
| Primary Target | Developer Environments |
Embedded Malicious Code
CVE-2026-69158 is a high-severity Server-Side Request Forgery (SSRF) vulnerability in Ontola Atomic Server (atomic-server) and its underlying Rust library (atomic_lib). Prior to versions 0.40.2 and 0.40.3, the server exposed an unauthenticated HTTP GET endpoint at /bookmark (and handled user-supplied URLs via POST to /import) that fetched arbitrary caller-supplied URLs after performing only a naive string prefix check. Because endpoint routing bypassed read authorization checks and reflected the retrieved content back to the client, unauthenticated remote attackers can force the server to issue HTTP GET requests to internal network destinations, localhost services, and cloud instance metadata endpoints.
CVE-2026-71425 (GHSA-7jvc-9xq8-frff) is a Server-Side Request Forgery (SSRF) and credential exposure vulnerability in Outstatic, an open-source Next.js-based static site Content Management System (CMS). In versions prior to 2.2.1, the authenticated GitHub REST proxy (/api/outstatic/github) constructed upstream URLs via insecure string concatenation of an unvalidated endpoint parameter and merged arbitrary user-supplied HTTP headers directly into outbound requests. Because the proxy automatically attaches the active user's GitHub OAuth access token to these requests, an authenticated caller or an attacker leveraging a cross-origin request primitive can redirect the server's outbound request to an arbitrary external host and exfiltrate the OAuth bearer token.
CVE-2026-71861 (GHSA-wq26-3j2m-4hvv) is a high-severity authentication bypass and cryptographic signature-binding replay vulnerability in the Chainguard Go SDK (chainguard.dev/sdk / github.com/chainguard-dev/sdk) affecting versions prior to v0.1.107. The vulnerability resides in the auth/aws.VerifyToken function, which validates AWS STS GetCallerIdentity requests signed with AWS Signature Version 4 (SigV4) to authenticate AWS workloads. Prior to version v0.1.107, VerifyToken verified the values of custom HTTP binding headers (Chainguard-Audience and Chainguard-Identity) without confirming that those headers were listed in the SigV4 SignedHeaders parameter of the Authorization header. Because AWS STS ignores unsigned headers when recomputing and verifying the SigV4 signature, an attacker who captures any valid, fresh SigV4-signed STS GetCallerIdentity request from a victim AWS principal can inject or overwrite the Chainguard-Audience and Chainguard-Identity headers and replay the token to bypass authentication and impersonate the victim identity.
CVE-2026-73864 is a CWE-494 (Download of Code Without Integrity Check) vulnerability in the Node.js package install-artifact-from-github prior to version 1.7.0. The tool downloads precompiled native Node.js C/C++ addons (.node binaries) from GitHub Releases or configurable mirrors and writes them directly to disk without verifying cryptographic checksums or signatures. Furthermore, its HTTP client follows cross-protocol redirects from HTTPS to plaintext HTTP. When the consuming application loads the downloaded addon via require(), the unverified native binary executes immediately within the Node.js process, permitting arbitrary native code execution if an attacker compromises a GitHub release asset, poisons a configured mirror, or intercepts downgraded network traffic.
LLMKube prior to version 0.9.0 fails to restrict local filesystem paths and file:// URIs supplied in the Model.spec.source field of custom resources. A namespace-level user with permission to create or modify Model and InferenceService resources can traverse the filesystem of the operator controller pod or mount arbitrary host node files via a HostPathVolumeSource. This enables unauthorized disclosure of high-privilege Kubernetes ServiceAccount tokens and underlying host credentials.
CVE-2026-75521 is an unauthenticated remote authentication bypass vulnerability in Miren Runtime prior to version 0.11.1. The QUIC/HTTP3 RPC service configures its TLS listener with tls.RequestClientCert, which requests client certificates without validating them against the cluster Certificate Authority. Simultaneously, the RPC authenticators extract caller identities directly from PeerCertificates[0] without checking VerifiedChains, granting any caller presenting a self-signed certificate the AuthMethodCert identity and a complete Role-Based Access Control (RBAC) bypass.