100% Free & Open Source

Detect & Block the
Shai-Hulud 2.0 npm Worm

Free scanner for the Shai-Hulud 2.0 (Sha1-Hulud) supply chain attack. Detects 790+ compromised packages from Zapier, PostHog, ENS Domains, AsyncAPI. Finds setup_bun.js malware, TruffleHog credential theft, and preinstall script exploits.

# Add to .github/workflows/security.yml
- uses: gensecaihq/Shai-Hulud-2.0-Detector@v1
with:
fail-on-critical: true

790+

Shai-Hulud Infected Packages

25K+

GitHub Repos Compromised

<100ms

Worm Detection Time

--

GitHub Stars

Shai-Hulud Worm Detection Features

Comprehensive Sha1-Hulud and npm supply chain attack detection beyond simple package matching

🎯

790+ Compromised Packages

Detects all known Shai-Hulud 2.0 infected packages including Zapier, PostHog, ENS Domains, AsyncAPI, Postman, and CrowdStrike namespaces with precise semver matching.

🔍

setup_bun.js Malware Detection

Identifies malicious preinstall scripts, setup_bun.js, bun_environment.js payloads, and TruffleHog credential scanning activity used by the Shai-Hulud worm.

🛡️

SHA1HULUD Runner Detection

Finds SHA1HULUD self-hosted runner backdoors that attackers use for persistent access. Scans workflows for rogue runner references.

📦

All Lockfile Formats

Scans package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, and npm-shrinkwrap.json. Catches compromised direct and transitive dependencies.

🏢

Monorepo & Workspace Support

Automatically scans all packages in monorepos. Works with Lerna, Nx, Turborepo, pnpm workspaces, and Yarn workspaces.

CI/CD Pipeline Ready

Scans in under 100ms with SARIF output for GitHub Security. Works with GitHub Actions, GitLab CI, Jenkins, Azure DevOps, and CircleCI.

What is Shai-Hulud 2.0 / Sha1-Hulud npm Worm?

On November 24, 2025, the self-replicating Shai-Hulud 2.0 worm (also called Sha1-Hulud or "The Second Coming") compromised 790+ npm packages and 25,000+ GitHub repositories within 72 hours. This credential-stealing malware spread at ~1,000 new repos every 30 minutes.

  • Uses TruffleHog to steal GitHub PATs, npm tokens, AWS/GCP/Azure keys
  • Injects setup_bun.js and bun_environment.js via preinstall scripts
  • Self-propagates by infecting up to 100 additional packages
  • Creates persistent SHA1HULUD self-hosted runner backdoors
  • Destructive failsafe wipes home directory if exfiltration fails
Zapier ENS Domains PostHog AsyncAPI Postman CrowdStrike Voiceflow BrowserBase @ctrl/* +50 more
# Shai-Hulud Attack Chain

1. npm install @zapier/pkg
2. preinstall → setup_bun.js
3. Downloads Bun runtime
4. Executes bun_environment.js
5. Runs TruffleHog credential scan
6. Steals GitHub/npm/AWS tokens
7. Exfiltrates to GitHub repos
8. Infects 100+ more packages
9. Creates SHA1HULUD runner

How to Detect Shai-Hulud npm Worm in Your Project

Scan for Sha1-Hulud malware in 2 minutes with GitHub Actions

1

Create Workflow File

Add a YAML file to your .github/workflows directory with the detector action.

2

Push to Repository

Commit and push. The action runs automatically on every push and pull request.

3

Stay Protected

Compromised packages are blocked. Clean projects pass. It's that simple.

Help Detect & Stop the Shai-Hulud npm Worm

Join the open source community protecting JavaScript developers from Shai-Hulud 2.0. Star the project, report new compromised packages, or contribute detection rules. Every contribution helps stop the Sha1-Hulud supply chain attack.

Released under the MIT License. Use it freely in personal and commercial projects.