Skip to main content

The Evolution of the Threat: Why Shai-Hulud 2.0 Forces Us to Redefine Software Supply Chain Security

Sebastian • Cyber Security Consultant
10 min read
The Evolution of the Threat: Why Shai-Hulud 2.0 Forces Us to Redefine Software Supply Chain Security

As ICWT (In Cloud We Trust), we monitor the evolution of threats and deliver solutions that address real-world challenges. Recent attacks on the open-source ecosystem, especially the return of Shai-Hulud malware in version 2.0, demonstrate that software supply chain risk no longer concerns only CVEs and coding flaws, but also compromised identities and trusted automation.

Scanning after the fact is no longer sufficient. We must move to a security model that anticipates threats by understanding the context of the code and the entire ecosystem. Developers are often unaware of the dependencies used by their code.

The Scale and Sophistication of the Shai-Hulud 2.0 Attack

Version 2.0, identified in November 2025 as "The Second Coming," showed the speed at which threats spread across the npm ecosystem. The first attack in September 2025 compromised more than 180 npm packages. The new wave in November 2025 affected more than 796 unique npm packages and 1,092 unique versions, impacting projects from Zapier, ENS Domains, PostHog, and Postman.

Credential Theft and Worm Propagation

The attack began with the takeover of developer accounts and the injection of malicious code into popular npm dependencies. The code harvested credentials by targeting:

  • GitHub tokens (PATs/Actions secrets)
  • npm tokens
  • Cloud access keys (AWS, GCP, Azure)
  • Other secrets via the Trufflehog tool

The self-propagation mechanism was particularly alarming: using stolen npm tokens, the worm automatically infected additional packages, incremented version numbers, and published them to npm.

A Deliberate Strike on the CI/CD Process and Cloud Environments

The attack was not limited to developers' machines. Around 20% of compromised machines were GitHub runners. The malware detected the CI environment through variables such as GITHUB_ACTIONS or GITLAB_CI.

In CI environments, the payload operated synchronously to keep the runner active. On developers' machines, it ran in the background to avoid raising suspicion.

The malware scraped configuration files and used SDK packages to interact with cloud instance metadata services (IMDS) in order to capture temporary authentication tokens.

Sophisticated Exfiltration and a "Safety Switch"

Unlike earlier attacks, Shai-Hulud 2.0 uses public GitHub repositories for data exfiltration, created using stolen tokens and marked with the description: "Sha1-Hulud: The Second Coming".

The attackers created a defensive mechanism: a dead man's switch. If an infected system loses access to GitHub and npm, the malware triggers a destructive payload, attempting to destroy user data by overwriting disk sectors or using the shred tool.

This tactic makes traditional incident response methods risky — they may lead to data destruction on thousands of infected systems.

Reducing the Risk: Aikido Security in the Software Supply Chain

Traditional approaches such as SAST (Static Application Security Testing) or DAST reveal their gaps in software supply chain protection, because the malicious code arrives in a trusted dependency and runs as soon as the package is installed. ICWT deploys the Aikido Security platform, which combines dependency analysis, malicious package detection, secrets detection and CI/CD pipeline controls.

Comprehensive Visibility and SBOM as the Foundation

Aikido's SCA (Software Composition Analysis) module scans direct and transitive dependencies, detects known vulnerabilities and lets you generate a Software Bill of Materials (SBOM).

Reachability analysis shows whether vulnerable code is actually called by the application, and dependencies containing malware are flagged based on Aikido's own database of malicious packages. When a campaign such as Shai-Hulud is disclosed, this makes it quick to see which repositories use compromised package versions.

Policy Enforcement in CI/CD

Attacks such as Shai-Hulud 2.0 exploit compromised credentials and trusted automation. Aikido lets you build protection into DevSecOps pipelines through:

  • Security gates in CI/CD that stop a build or pull request introducing a vulnerable or malicious dependency
  • Detection of secrets in code, such as npm and GitHub tokens or cloud keys, so that exposed credentials can be found and revoked quickly

Tools do not replace process hygiene: in parallel, require hardware-based 2FA, use short-lived tokens and disable install scripts by default in CI.

Blocking Malicious Packages Before Installation

Shai-Hulud 2.0 ran its malicious code in package install scripts, so scanning after the fact comes too late. Aikido Safe Chain is a free tool that checks npm and PyPI packages against Aikido's malware database before installation and blocks those flagged as malicious.

Safe Chain wraps package manager commands such as npm, yarn or pnpm, so it protects both developer workstations and CI runners without changing the day-to-day workflow.

For vulnerable dependencies, Aikido can automatically prepare a fix as a pull request upgrading to a safe version (AI Autofix), and alerts are deduplicated, so the team gets concrete tasks instead of hundreds of generic messages.

Aikido's IDE plugins surface dependency and secret issues before the commit, shifting security left in the software development lifecycle.

Summary: Strengthening Your Organization's Resilience

In an era where 70–90% of code in modern applications comes from open-source dependencies, and attacks are increasingly targeting the takeover of credentials and automation, shared responsibility cannot rely on passively waiting for a patch.

Resilience is achieved by monitoring and strengthening the software development and integration process (CI/CD).

ICWT supports the implementation and optimization of the Aikido Security platform. Do not let the evolution of threats catch your organization off guard - get in touch to discuss securing the software supply chain and protecting credentials against next-generation attacks.

Tags:
#Shai-Hulud #supply chain security #Aikido Security #npm #CI/CD #DevSecOps