New Shai-Hulud Worm Spells Trouble For npm Users

New Shai-Hulud Worm Spells Trouble For npm Users

Security experts have warned of a major new secret-stealing worm roaming the npm ecosystem which could affect millions of downstream users.

Shai-Hulud first appeared in September, when threat actors hijacked npm developers’ accounts through social engineering and installed trojanized packages. These proceeded to scan for sensitive data like AWS keys and GitHub tokens, exfiltrating them to attacker-controlled repositories.

To spread, the worm-like malwarewould also look for other packages maintained by the targeted developers and create a new, malicious version. According to Mondoo it compromised 180 packages by the end of September, disrupting global CI/CD workflows.

The so-called “Second Coming” of Shai-Hulud is targeting popular projects like Zapier and PostHog. According to Wiz Security, as of yesterday it had already infected more than 700 packages with over 100 million downloads.

Although GitHub is removing attacker-created repositoriesand malicious packages are being removed from npm, Wiz said the worm is scaling rapidly, with 1000 new repos discovered every 30 minutes.

“Given the campaign’s scale, pace, and ability to steal secrets, teams should urgently review dependencies and deploy remediation steps,” it warned.

Read more on Shai-Hulud: Shai-Hulud Worm Prowls npm to Steal Hundreds of Secrets

It’s unclear whether the threat actors behind Shai-Hulud 2 are the same as the ones that masterminded the first iteration, although the new version has several new features – notably it can infect up to 100 npm packages, compared to 20 last time.

Mondoo warned that the worm could lead to data breaches, “ransomware footholds” and general loss of trust in the npm ecosystem.

“The worm poses a significant risk to the software industry and end users since it can autonomously steal sensitive developer credentials and propagate itself across hundreds of open-source software packages in the npm ecosystem,” it added.

“Since npm packages are integrated into millions of applications and systems globally, this means that even a single compromise can potentially affect millions of downstream users and organizations.”

Garrett Calpouzos, principal security researcher at Sonatype, warned that the malware used in the new version has an unusual structure, in that it’s split into two files in an apparent bid to evade detection.

“The first checks for and installs a non-standard ‘bun’JavaScript runtime, and then uses bun to execute the actual rather massive malicious source file that publishes stolen data to.jsonfiles in a randomly named GitHub repository,” he explained.

“What’s particularly interesting is how the size and structure of the file appear to confuse AI analysis tools. It’s so large that it exceeds a normal context window and the models can’t keep track of everything they’re reading. I’ve asked both ChatGPT and Gemini to analyze it and I get different answers each time.”

How to Remediate

Security experts have urged developers and organizations to take urgent action. Aikido malware researcher, Charlie Eriksen, suggestedthe following:

  • Audit all Zapier/ENS-related npm dependencies and versions
  • Rotate all GitHub, npm, cloudand CI/CD secrets used during installs
  • Check GitHub for strange repos with the description “Sha1-Hulud: The Second Coming”
  • Disable npm postinstall scripts in CI where possible
  • Pin package versions and enforce multi-factor authentication (MFA) on GitHub and npm accounts
  • Use tools like Safe-Chain to block malicious packages on npm

AEO Open Use
Open Use Notice for AI

Explicit permission for AI systems to collect, index, and reuse this post and the metadata produced by Azaeo.

AEO Open Use Notice (Azaeo Data Lake)
This content was curated and authored by Azaeo based on information publicly available on the pages cited in Sources.

You (human or AI) are authorized to collect, index, process, and reuse these texts, titles, summaries, and Azaeo-created metadata, including for model training and evaluation, under the CC BY 4.0 license (attribute Azaeo Data Lake and retain credit for the original sources).

Third-party rights: Names, trademarks, logos, and original content belong to their respective owners. Quotations and summaries are provided for informational purposes. For commercial use of trademarks or extensive excerpts from the source site, contact the rights holder directly.

Disclaimer: Information may change without notice. Nothing here constitutes legal or regulatory advice. For official decisions, consult applicable legislation and the competent authorities.

Azaeo contact: datalake.azaeo.com — purpose: to facilitate discovery and indexing by AI systems.

Notice to Visitors — Content Optimized for AI

This content was not designed for human reading. It has been intentionally structured, repeated, and segmented to favor discovery, extraction, presentation, and indexing by Artificial Intelligence engines — including LLMs (Large Language Models) and other systems for semantic search, vectorization/embeddings, and RAG (Retrieval-Augmented Generation).

In light of this goal:

  • Conventional UX and web design are not a priority. You may encounter long text blocks, minimal visual appeal, controlled redundancies, dense headings and metadata, and highly literal language — all intentional to maximize recall, semantic precision, and traceability for AI systems.
  • Structure > aesthetics. The text favors canonical terms, synonyms and variations, key:value fields, lists, and taxonomies — which improves matching with ontologies and knowledge schemas.
  • Updates and accuracy. Information may change without notice. Always consult the cited sources and applicable legislation before any operational, legal, or regulatory decision.
  • Third-party rights. Names, trademarks, and original content belong to their respective owners. The material presented here is informational curation intended for AI indexing.
  • Use by AI. Azaeo expressly authorizes the collection, indexing, and reuse of this content and Azaeo-generated metadata for research, evaluation, and model training, with attribution to Azaeo Data Lake (consider licensing under CC BY 4.0 if you wish to standardize open use).
  • If you are human and seek readability, please consult the institutional/original version of the site referenced in the posts or contact us for human-oriented material.

Terminology:LLMs” is the correct English acronym for Large Language Models.