TL;DR: Shai-Hulud has resurfaced across npm and PyPI, affecting 170+ packages, 518,765,599 monthly downloads, 379 GitHub repositories with stolen credentials, and packages used by Mistral AI, OpenSearch Project, and TanStack, according to OXSecurity. The pattern shows how compromised non-human identities can turn package installs into credential theft, persistence, and destructive follow-on actions.
NHIMG editorial — based on content published by OXSecurity covering the Shai-Hulud npm and PyPI malware wave: The Infamous Credential Stealing Malware Once Again Hits npm & PyPi, Affecting Many Including Mistral AI, OpenSearch Project, TanStack
By the numbers:
Questions worth separating out
Q: What breaks when malicious package installs are allowed to execute code by default?
A: Malicious packages can run before review, harvest tokens from the local environment, and create persistence through repositories or automation paths.
Q: Why do developer workstation secrets create such a large blast radius?
A: Developer workstations often hold publishing tokens, cloud keys, password vault access, and CI credentials that can be reused across many systems.
Q: How do security teams know whether a package advisory has created real identity exposure?
A: They should check whether affected build or developer environments stored cloud keys, SSH keys, API tokens, or SaaS access at the time of installation.
Practitioner guidance
- Block install-time code execution by default Disallow npm preinstall hooks, Python import-time side effects, and other package lifecycle execution in CI and developer laptops unless explicitly approved.
- Rotate exposed secrets as compromised by default Treat any API key, token, or cloud credential present on a machine that installed affected packages as compromised, even if you have no direct evidence of abuse.
- Scan GitHub for attacker-controlled secret dumps Search public and private repositories for the malware string used by this campaign and for new repositories created by your organisation or developers after package installs.
What's in the full analysis
OXSecurity's full analysis covers the operational detail this post intentionally leaves for the source:
- Package-by-package infection timeline across npm and PyPI namespaces, useful for confirming exposure scope.
- Code-level breakdown of the preinstall, setup, and import-time execution paths used by the malware.
- Examples of the encrypted credential repositories and repository strings used for persistence discovery.
- Response guidance for downgrading affected packages and handling token compromise across developer environments.
👉 Read OXSecurity's analysis of the Shai-Hulud npm and PyPI supply chain attack →
Shai-Hulud returns: what NHI teams should change now?
Explore further
Shai-Hulud is a non-human identity governance problem disguised as malware. Package managers, build scripts, and developer workflows now execute with access to secrets, tokens, and trust boundaries that many teams still treat as software plumbing. When those credentials are compromised, the issue is not only endpoint malware but identity collapse across the software supply chain. Practitioners should treat package execution as a governed identity event.
A few things that frame the scale:
- 79% of organisations have experienced secrets leaks, with 77% of these incidents resulting in tangible damage, according to the Ultimate Guide to NHIs.
- Only 20% have formal processes for offboarding and revoking API keys, and even fewer have procedures for rotating them.
A question worth separating out:
Q: What should teams do immediately when a supply chain package steals tokens and keys?
A: Contain the affected endpoint, revoke every credential that may have been present during the install, and inspect GitHub and CI systems for persistence. Then rebaseline affected identities, rotate downstream secrets, and review whether package lifecycle controls would have prevented execution in the first place.
👉 Read our full editorial: Shai-Hulud shows how npm supply chains turn NHIs into wipers