
Defense Against the Shai-Hulud Supply Chain Attack
A security tool to detect compromised npm packages from the Shai-Hulud supply chain attacks (original September 2025 and Shai-Hulud 2.0 November 2025). Scans both package.json and package-lock.json files to detect exact installed versions and Indicators of Compromise (IoCs). Available in both Python and Node.js implementations with centralized YAML configuration for easy maintenance.
Latest Update: November 24, 2025 - 738+ compromised packages tracked with 1,291 unique package@version combinations. Now detects both original Shai-Hulud and Shai-Hulud 2.0 attack variants.
For multi-ecosystem scanning, see ore-mal-pkg-inspector.
For multi-ecosystem malicious package scanning (npm, PyPI, Maven, RubyGems, Go, Cargo), see: ore-mal-pkg-inspector - Comprehensive malicious package scanner with dynamic threat intelligence.
OreNPMGuard focuses specifically on Shai-Hulud attack defense for npm packages.
Shai-Hulud is a self-replicating worm that began compromising npm packages on September 14-15, 2025, representing the first successful self-propagating attack in the npm ecosystem and one of the most severe JavaScript supply-chain attacks observed to date. Named after the giant sandworms from Frank Herbert's Dune series, this malware has evolved into multiple variants.
The original attack infected 200+ npm packages (as tracked in this tool) with multiple versions affected per package.
A new variant emerged in November 2025 with significant changes:
preinstall scripts (not just postinstall)setup_bun.js and bun_environment.js (in addition to bundle.js)Reference: Wiz Research - Shai-Hulud 2.0 Blog Post
Patient Zero: The attack started with the rxnt-authentication package published on September 14, 2025, at 17:58:50 UTC by the compromised "techsupportrxnt" npm account.
Attack Chain (Original Shai-Hulud):
postinstall script executing bundle.js (3MB+ JavaScript payload)data.json (double base64-encoded).github/workflows/shai-hulud-workflow.yml) that exfiltrates repository secrets to webhook[.]sitepostinstall hooksAttack Chain (Shai-Hulud 2.0 - November 2025):
preinstall script executing setup_bun.js or bun_environment.js (new payload files)cloud.json, contents.json, environment.json, and truffleSecrets.json files.github/workflows/discussion.yaml with self-hosted runner for backdoor access.github/workflows/formatter_*.yml for secret exfiltration (then deletes workflow to hide activity)docker run --rm --privileged -v /:/hostghp_*, gho_*), npm authentication tokensOriginal Shai-Hulud (September 2025):
@ctrl/tinycolor, ngx-bootstrap)Shai-Hulud 2.0 (November 2025):
Verified Credential Theft (from ~20,000 analyzed repos):
CRITICAL: Wiz Research has confirmed cross-victim exfiltration is occurring. This means:
Investigation Implication: When reviewing exfiltrated data in your repositories, verify whether the data actually belongs to your organization or another victim.
This attack is directly linked to the August 2025 s1ngularity/Nx compromise, where initial GitHub token theft enabled the broader supply chain attack. Many initial Shai-Hulud victims were known victims of the s1ngularity attack. Security researchers also note the integration of AI-generated content within the campaign, with moderate confidence that an LLM was used to generate the malicious bash script.

MISP (core software) - Open Source Threat Intelligence and Sharing Platform

Open Cyber Threat Intelligence Platform

Scalable threat intelligence platform that enriches observables and files using 200+ analyzers, with built-in GUI, REST API, and automated workflows for SOC analysts and DFIR teams.