Skip to main content
Back
IntrusionAWS · Google Cloud · SaaS
14 min read

Shai-Hulud npm worm harvesting cloud credentials

Victim
npm package maintainers and the developer and CI hosts that installed the compromised packages; the organizations are unnamed, and CrowdStrike's npm packages were among those compromised
When
Sep 14, 2025Disclosed Sep 15, 2025
Entry
A compromised version of an npm package whose postinstall script ran a credential-stealing payload during npm install on Linux and macOS hosts; how the first maintainer account or npm token was obtained is not known.

From September 14, 2025, compromised versions of npm packages ran a payload during npm install on Linux and macOS hosts, and with each npm token it found the worm republished the maintainer's other packages. On each host the payload collected GitHub and npm tokens and cloud keys, queried the AWS and Google Cloud metadata endpoints, and read AWS Secrets Manager in every region and Google Cloud Secret Manager. It committed its findings to a public Shai-Hulud repository in the victim's GitHub account and a pushed workflow sent repository secrets to webhook.site; no source reports that the stolen cloud credentials were then used.

What happened

External Parties
webhook.site
npm registry
Internet
Instance MetadataAWS, ECS and Google Cloud
GitHub
Install Hosts
+ Secrets Manager
+ every region
+ STS validation
AWS Account
+ Secret Manager
+ listed secrets
+ secret values
Google Cloud Project
Public Repos
Repositories
Actions Workflow
Compromised Package
Tokens and Cloud Keys

Replaying the Shai-Hulud September 2025 intrusion

  1. 1

    A worm in the npm registry

    From Sep 14, 2025; end not stated

    Malicious versions are published to npm from a maintainer's account, an npm install runs the payload, and each npm token it finds republishes that maintainer's other packages.

  2. 2

    Credentials on the host

    Each install, from Sep 14, 2025

    The payload collects tokens and cloud keys from the environment and from files, and queries the AWS and Google Cloud metadata endpoints for temporary credentials.

  3. 3

    Cloud secret stores read

    Each install with cloud credentials; dates not stated

    The payload checks the AWS credentials it finds with AWS STS and reads AWS Secrets Manager in every region; it lists and reads Google Cloud Secret Manager.

  4. 4

    Exfiltration to GitHub and a webhook

    Sep 15–16, 2025 per GitGuardian; per host not stated

    The findings go to a new public Shai-Hulud repository, a pushed workflow sends repository secrets to webhook.site, and private repositories are copied to public ones.

Impact

Compromised versions of hundreds of npm packages, over 500 per GitHub and CISA; on each host that installed one, GitHub and npm tokens and cloud keys were collected, AWS Secrets Manager and Google Cloud Secret Manager were read, and the findings were published in public GitHub repositories. No source reports that a stolen cloud credential was used against a cloud account, and no source counts the cloud credentials or secret values taken.

Outcome

Where cloud-provider controls fit

The payload needed no cloud weakness: it ran as the installing user and read what that user could read, and IMDSv2 answers any program on the instance that completes its handshake. Disabling the metadata service on an instance closes that endpoint to every program, and the page for that option does not name the ECS task endpoint, which one analyzed package also queried. No source reports that anyone used the stolen cloud credentials, so this replay ends at the exfiltration and draws no cloud intrusion. Where your builds and developers use short-lived role credentials instead of long-lived keys, a copied credential stops working on its own. Network conditions in a service control policy, a resource control policy or a VPC Service Controls perimeter would have refused secret reads made from machines outside your networks, and a permissions boundary or an IAM deny policy would have kept a build's identity to its own secrets. The npm registry, the package manager on your hosts and your GitHub organization's token, workflow and visibility settings own the rest: no cloud-provider policy reaches them.

Could this have been prevented?

In hindsight, not as a whole. 1 control would have refused a step outright, and 29 controls would have limited one. 7 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.

1
Prevented
29
Contained
7
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

External Parties
webhook.site
npm registry
Internet
Instance MetadataAWS, ECS and Google Cloud
GitHub
Install Hosts
+ Secrets Manager
+ every region
+ STS validation
AWS Account
+ Secret Manager
+ listed secrets
+ secret values
Google Cloud Project
Public Repos
Repositories
Actions Workflow
Compromised Package
Tokens and Cloud Keys

Replaying the Shai-Hulud September 2025 intrusion

1 · A worm in the npm registry

1 Prevented4 Contained3 Not covered

2 · Credentials on the host

10 Contained2 Not covered6 on other clouds

3 · Cloud secret stores read

7 Contained4 on other clouds

4 · Exfiltration to GitHub and a webhook

8 Contained2 Not covered2 on other clouds

Key facts

  • Socket's first observed compromise was rxnt-authentication 0.0.3, published at 17:58:50 UTC on September 14, 2025; GitHub says it was notified of the attack the same day
  • Package counts varied by date and method: 40+ per Socket on September 15, at least 187 per BleepingComputer on September 16, a 526-entry list per Socket and 500+ removed from the registry per GitHub
  • Per Socket, the largest single burst was nearly 100 packages published from the crowdstrike-publisher account at 01:14 UTC on September 16, 2025
  • The payload queried the AWS instance metadata service and the Google Cloud metadata server, and in one package ReversingLabs analyzed the ECS task-metadata endpoint; it read AWS Secrets Manager in every region and Google Cloud Secret Manager, and no source counts the credentials or secret values taken
  • GitGuardian counted 278 secrets leaked publicly on GitHub, 90 from data.json files and 188 from the malicious workflows, with AWS keys among the most leaked types and 37 still valid at the time of writing
  • No source reports that a stolen cloud credential was used against a cloud account; on September 22, 2025 GitHub announced npm publishing limited to local publishing with required 2FA, seven-day granular tokens and trusted publishing

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    Widespread Supply Chain Compromise Impacting npm EcosystemCISA · Sep 23, 2025 · AdvisoryPackage count, credential targets, exfiltration channels, propagation, initial access (not described), recommended actions
  2. 2.
    Our plan for a more secure npm supply chainGitHub · Sep 22, 2025 · Vendor reportNotification date, registry response, removed package count, npm publishing changes
  3. 3.
    Shai-Hulud: Ongoing Package Supply Chain Worm Delivering Data-Stealing MalwareWiz Research · Nov 24, 2025 · ResearchSecret harvesting including IMDS, exfiltration channels, webhook deactivation, repository migration, victim counts, s1ngularity/Nx assessment
  4. 4.
    Shai-Hulud: Self-Replicating Worm Compromises 500+ NPM PackagesStepSecurity · Sep 15, 2025 · ResearchPayload execution, AWS module (STS, Secrets Manager, regions), Google Cloud Secret Manager module, propagation, workflow persistence, public exfiltration repository, recommended actions
  5. 5.
    Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ PackagesSocket · Sep 16, 2025 · ResearchCloud metadata endpoints, environment variables, credential validation, data.json staging, workflow file, early package count
  6. 6.
    Updated and Ongoing Supply Chain Attack Targets CrowdStrike npm PackagesSocket · Sep 16, 2025 · ResearchPublishing timeline (UTC), first observed compromise, payload versions, CrowdStrike packages, 526-entry package list, migration repositories
  7. 7.
    Shai-hulud npm attack: What you need to knowReversingLabs · Oct 10, 2025 · ResearchPatient zero, detection date, initial compromise (not known), exfiltration format, repository migration
  8. 8.
    The Shai-Hulud worm strikes @nstudio/nativescript-loading-indicator 5.0.3ReversingLabs (Spectra Assure Community) · Jun 11, 2026 · ResearchCloud metadata endpoints (AWS instance, AWS ECS task, Google Cloud), STS validation, response guidance
  9. 9.
    "Shai-Hulud" Worm Compromises npm Ecosystem in Supply Chain Attack (Updated November 26)Palo Alto Networks Unit 42 · Dec 3, 2025 · ResearchInitial access hypothesis, credential targets, exfiltration, propagation (September statements only)
  10. 10.
    Shai-Hulud: The novel self-replicating worm infecting hundreds of NPM packagesSysdig · Sep 16, 2025 · ResearchIMDS credential search, TruffleHog use, repository migration, package count on September 16, 2025
  11. 11.
    Shai-Hulud Attack: A Persistent Secret Leaking CampaignGitGuardian · Sep 23, 2025 · ResearchLeaked secret counts, secret types, validity, affected users, activity window
  12. 12.
    Self-propagating supply chain attack hits 187 npm packagesBleepingComputer · Sep 16, 2025 · NewsPackage count on September 16, 2025, CrowdStrike packages and statement, first public alert

The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.

More cloud attack breakdowns

All breakdowns