RL Blog

Topics

All Blog PostsAppSec & Supply Chain SecurityDev & DevSecOpsProducts & TechnologySecurity OperationsThreat Research

Follow us

XX / TwitterLinkedInLinkedInFacebookFacebookInstagramInstagramYouTubeYouTubeblueskyBluesky

Subscribe

Get the best of RL Blog delivered to your in-box weekly. Stay up to date on key trends, analysis and best practices across threat intelligence and software supply chain security.

ReversingLabs: The More Powerful, Cost-Effective Alternative to VirusTotalSee Why
Skip to main content
Contact UsSupportLoginBlogCommunity
reversinglabsReversingLabs: Home
Solutions
Secure Software OnboardingSecure Build & ReleaseProtect Virtual MachinesIntegrate Safe Open SourceGo Beyond the SBOM
Increase Email Threat ResilienceDetect Malware in File Shares & StorageAdvanced Malware Analysis SuiteICAP Enabled Solutions
Scalable File AnalysisHigh-Fidelity Threat IntelligenceCurated Ransomware FeedAutomate Malware Analysis Workflows
Products & Technology
Spectra Assure®Software Supply Chain SecuritySpectra DetectHigh-Speed, High-Volume, Large File AnalysisSpectra AnalyzeIn-Depth Malware Analysis & Hunting for the SOCSpectra IntelligenceAuthoritative Reputation Data & Intelligence
Spectra CoreIntegrations
Industry
Energy & UtilitiesFinanceHealthcareHigh TechPublic Sector
Partners
Become a PartnerValue-Added PartnersTechnology PartnersMarketplacesOEM Partners
Alliances
Resources
BlogContent LibraryCybersecurity GlossaryConversingLabs PodcastEvents & WebinarsLearning with ReversingLabsWeekly Insights Newsletter
Customer StoriesDemo VideosDocumentationOpenSource YARA Rules
Company
About UsLeadershipCareersSeries B Investment
EventsRL at RSAC
Press ReleasesIn the News
Pricing
Software Supply Chain SecurityMalware Analysis and Threat Hunting
Request a demo
Menu
AppSec & Supply Chain SecuritySeptember 30, 2025

FAQ: The Shai-hulud npm worm attack explained

Here's what you need to know about the discovery of the first self-replicating npm worm, which compromised packages with cloud token-stealing malware.

paul roberts headshot black and white
Paul Roberts, Director of Content and Editorial at RLPaul Roberts
FacebookFacebookXX / TwitterLinkedInLinkedInblueskyBlueskyEmail Us
FAQ: Shai hulud explained

While crisis was averted with the recent Shai-hulud worm attack on npm, it proved that a self-propagating malware can automate the compromise of open-source packages. Here's what you need to know about the historic Shai-hulud malware outbreak.

What is Shai-hulud, and why is it notable?

  • “Shai-hulud” is a self-replicating worm found in the npm package registry.
  • The worm exploits compromised npm developer accounts, then uses them to inject malicious code into packages that the compromised accounts maintain. Shai-hulud then spreads via package inter-dependencies. 
  • Shai-hulud is one of the first known worms that operates within the open-source supply chain at scale, combining token-stealing, the exposure of private code repositories, and automated propagation.

When and how was the worm discovered?

  • ReversingLabs (RL) researchers first detected Shai-hulud — a cascading compromise — on September 15.
  • Researchers identified the npm package rxnt-authentication version 0.0.3, published September 14 at 17:58:50 UTC as the first known compromised package (Patient Zero).
  • Between this initial detection and September 16, the campaign affected hundreds of npm packages, including some with large weekly download numbers.

[ Watch: Q&A about Shai-hulud | Read: RL's Tomislav Peričin's Shai-hulud analysis]

What does the worm do?

  1. Code injection and autospreading
    • After compromising an npm account, the worm finds other packages maintained by that account. It automatically creates new versions of those packages with a postinstall script that adds a malicious bundle.js.
    • This bundle.js is executed when users install the package.
  2. Secret/token theft
    • The worm’s bundle script searches for environment tokens, focusing on npm, GitHub, AWS, GCP, etc.
    • It uses TruffleHog, a popular open-source tool that can detect more than 800 different types of secrets, to identify the victims’ secrets.
  3. Exfiltration to GitHub
    • Discovered secrets are exfiltrated to GitHub repositories created by the attacker, named “Shai-hulud Repository,” with the description “Shai-hulud Repository.” The stolen data is double Base64-encoded in a file called data.json.
    • Also, in some compromised user accounts, a new branch named Shai-hulud is added in existing repositories, with a malicious GitHub Actions workflow (.github/workflows/Shai-hulud-workflow.yml) that exfiltrates accessible tokens.
  4. Exposure of private repos
    • The worm attempts to create public copies (“migration”) of all private GitHub repositories belonging to the compromised account, naming them with a “-migration” suffix. These are described as “Shai-hulud Migration.”
    • The intent appears to be exposure of both source code and secrets embedded in private repos, possibly for the purpose of harvesting and re-use by malicious actors.

Which packages and developers have been affected?

  • Hundreds of npm packages were compromised, including several popular ones. They include ngx-bootstrap ( about 300K weekly downloads), ng2-file-upload (about 100K weekly downloads), and @ctrl/tinycolor (about 2.2 million weekly downloads).
  • The compromised maintainer accounts are diverse and include maintainers of open source libraries, founders/CTOs of tech firms, developers in AI companies, non-profits, security companies, etc.

How can I check whether my organization is infected?

  • On GitHub, check for new repositories you didn’t create, especially with descriptions such as “Shai-hulud Migration.”
  • Look for branches in your existing repositories named Shai-hulud.
  • Inspect whether any of your npm packages have been updated in ways you didn’t author or approve.
  • If you maintain packages, RL's Spectra Assure Community can help your team see whether any packages you manage have been flagged as infected.

What are the Indicators of Compromise (IOCs)?

  • A list of package names + versions + SHA-1 hashes of compromised versions has been published and can be viewed on the RL research team’s post.
  • The GitHub repos created by the attackers (“Shai-hulud Repository”, “Shai-hulud Migration”) and branches/workflows with known naming conventions.

What similarities to earlier attacks have been noted?

  • The techniques resemble those used in the “Nx compromise” (late August) and other recent attacks on open-source maintainers involving token theft, exfiltration, and CI/CD vector abuse.
  • Prior attacks exposed the vulnerabilities that are common in popular open-source packages. 
  • Attacks targeting the maintainers of packages exposing widely used dependencies have also been seen before, as recently as the compromise of Qix. 
  • Shai-hulud is an escalation of other incidents impacting open source, because of its worm-like propagation and its multifaceted impact (tokens, private repos, etc.). 

What should npm and other repos do to prevent further incidents?

  • Open-source registries like npm, PyPI and RubyGems should implement an emergency shutdown or pause button for new package publications during active, widespread attacks. 
  • Add more robust monitoring for anomalous package updates and version changes for maintainers.
  • Improve security posture for maintainers including implementing two-factor authentication (2FA); monitoring token hygiene; limiting privileges; and rotating tokens.
  • Increase automation and tooling for detection (e.g. labeling infected packages, scanning for suspicious postinstall scripts) plus faster communication from registries when high-impact compromises are identified.

Read the RL research post about Shai-hulud. Plus, see RL's Tomislav Peričin's analysis.

Keep learning

  • Get up to speed on the state of software security with RL's Software Supply Chain Security Report 2026. Plus: See the the webinar to discussing the findings.
  • Learn why binary analysis is a must-have in the Gartner® CISO Playbook for Commercial Software Supply Chain Security.
  • Take action on securing AI/ML with our report: AI Is the Supply Chain. Plus: See RL's research on nullifAI and watch how RL discovered the novel threat.
  • Get the report: Go Beyond the SBOM. Plus: See the CycloneDX xBOM webinar.

Explore RL's Spectra suite: Spectra Assure for software supply chain security, Spectra Detect for scalable file analysis, Spectra Analyze for malware analysis and threat hunting, and Spectra Intelligence for reputation data and intelligence.

Tags:AppSec & Supply Chain Security

More Blog Posts

AI coding racing

Can AppSec keep pace with AI coding?

AI lets software teams generate code at a rate faster than security can validate it. One way to win the race: more AI.

Learn More about Can AppSec keep pace with AI coding?
Can AppSec keep pace with AI coding?
Finger on map

LLMmap puts its finger on ML attacks

Researchers show how LLM fingerprinting can be used to automate generation of customized attacks.

Learn More about LLMmap puts its finger on ML attacks
LLMmap puts its finger on ML attacks
Vibeware bad vibes

Vibeware: More than bad vibes for AppSec

Threat actors are leveraging the freewheeling vibe-coding trend to deliver malicious software at scale.

Learn More about Vibeware: More than bad vibes for AppSec
Vibeware: More than bad vibes for AppSec
CRA accelerates advantage

The CRA is coming: Are you ready?

Here's how the EU's Cyber Resilience Act will reshape the software industry — and how that accelerates advantages.

Learn More about The CRA is coming: Are you ready?
The CRA is coming: Are you ready?

Spectra Assure Free Trial

Get your 14-day free trial of Spectra Assure for Software Supply Chain Security

Get Free TrialMore about Spectra Assure Free Trial
Blog
Events
About Us
Webinars
In the News
Careers
Demo Videos
Cybersecurity Glossary
Contact Us
reversinglabsReversingLabs: Home
Privacy PolicyCookiesImpressum
All rights reserved ReversingLabs © 2026
XX / TwitterLinkedInLinkedInFacebookFacebookInstagramInstagramYouTubeYouTubeblueskyBlueskyRSSRSS
Back to Top