npm

The Shai-Hulud 2.0 npm Supply Chain Attack

Updated 5 Oct 2026 · Incident date 24 Nov 2025

The second Shai-Hulud wave backdoored 796 unique npm packages across 1,092 versions, including @asyncapi/cli and posthog-node, on 24 November 2025.

The packages include @asyncapi/cli, posthog-node and zapier-platform-core. The payload ran at install time, before any of your code.

What happened

A worm took over maintainer accounts and pushed poisoned versions of their packages.

  • Each package got setup_bun.js, bun_environment.js and a preinstall script.
  • The payload installed the Bun runtime and searched for secrets with TruffleHog, .npmrc and cloud secret stores.
  • It uploaded the secrets to public GitHub repositories described as "Sha1-Hulud: The Second Coming."
  • It registered the machine as a self-hosted GitHub Actions runner.
  • It used stolen npm credentials to backdoor up to 100 more packages.

Datadog traces the first victim to the asyncapi/cli GitHub repository. It counts more than 500 GitHub users and more than 150 organizations hit.

Affected versions

  • Datadog counts 796 unique packages and 1,092 versions, with more than 20 million weekly downloads.
  • Unit 42 and Microsoft also name Zapier, PostHog, Postman, ENS Domains and AsyncAPI projects.
  • The sources give no single short list. Compare package-lock.json against a feed of known malicious versions.

Indicators of compromise

  • Files in a package: setup_bun.js and bun_environment.js, with a preinstall script in package.json.
  • GitHub repository description: "Sha1-Hulud: The Second Coming." Repository names use 18 random lowercase letters and digits.
  • GitHub workflow named "Discussion Create" (discussion.yaml) and a runner agent named SHA1HULUD.
  • SHA-256 of setup_bun.js: a3894003ad1d293ba96d77881ccd2071446dc3f65f434669b49b3da92421901a.
  • Other hashes (Unit 42): 62ee164b9b306250c1172583f138c9614139264f889fa99614903c12755468d0, f099c5d9ec417d4445a0328ac0ada9cde79fc37410914103ae9c609cbc0ee068, cbb9bc5a8496243e02f3cc080efbe3e4a1430ba0671f2e43a202bf45b05479cd.
  • Webhook (Unit 42): webhook[.]site/bb8ca5f6-4175-45d2-b042-fc9ebb8170b7.
  • Microsoft Defender alert names: "Sha1-Hulud Campaign Detected" and Trojan:JS/ShaiWorm.

How to check

Search installed packages for the two payload files.

find . -path "*/node_modules/*" \( -name setup_bun.js -o -name bun_environment.js \) -print

Search your GitHub account for the repository description.

gh search repos "Sha1-Hulud: The Second Coming" --owner YOUR_ORG_OR_USER

What to do now

  1. Rotate npm tokens, GitHub tokens, SSH keys and cloud credentials that any affected machine can read.
  2. Delete unknown repositories that match the description. Delete unknown workflows and self-hosted runners.
  3. Isolate CI agents that installed a bad version. Rebuild them.
  4. Pin dependencies and review any new install script before you update.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `@asyncapi/cli`. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

@asyncapi/cli

The package can now download a second program before installing, gather the machine's cloud passwords, and infect more packages automatically.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Which npm packages were affected?

Datadog counts 796 unique packages and 1,092 versions. Examples are @asyncapi/cli, posthog-node and zapier-platform-core.

How does it steal credentials?

A preinstall script runs setup_bun.js and bun_environment.js. They search for secrets and upload them to public GitHub repositories.

Sources

  1. securitylabs.datadoghq.com/articles/shai-hulud-2.0-npm-worm/
  2. unit42.paloaltonetworks.com/npm-supply-chain-attack/
  3. microsoft.com/en-us/security/blog/2025/12/09/shai-hulud-2-0-guidance-for-detecting-investigating-and-defending-against-the-supply-chain-attack/

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library