GitHub Account Breach Fuels Shai-Hulud npm Supply Chain Attack 

A compromised GitHub account fueled a supply chain attack, spreading credential-stealing malware across hundreds of packages.

Written By
Ken Underhill
Ken Underhill
Aug 4, 2026
3 minute read
eSecurity Planet content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

A large-scale software supply chain attack is affecting the JavaScript ecosystem after attackers compromised the GitHub account of a maintainer behind several widely used npm packages. 

The incident began on Aug.4, 2026, when malicious code was introduced into packages including keyv, flat-cache, and file-entry-cache, but quickly expanded into a broader Shai-Hulud campaign that has spread to hundreds of additional packages.

According to Aikido researchers, the attackers compromised the GitHub account of the maintainer behind keyv, a package with approximately 127 million weekly downloads. 

They then used GitHub Actions to publish malicious updates. 

Because the releases originated from the legitimate workflow, the compromised packages were published to npm with valid provenance, making them appear authentic. 

Key takeaways

  • Attackers hijacked a popular npm maintainer account to launch the Shai-Hulud supply chain attack.
  • The campaign spread to hundreds of packages with more than 2 billion monthly installs.
  • Malicious packages used npm preinstall scripts to steal cloud, GitHub, Kubernetes, and API credentials.
  • Valid GitHub Actions provenance made the compromised package releases appear legitimate.
  • Organizations should immediately secure development pipelines, rotate credentials, and strengthen software supply chain security controls.

Shai-Hulud attack spreads across the npm supply chain 

The attack has since evolved beyond a single compromised maintainer. 

Aikido reported that the malware spread to packages maintained by other organizations, affecting hundreds of packages with more than 2 billion monthly installs. 

Among the initially compromised packages were:

  • keyv
  • flat-cache
  • file-entry-cache
  • cacheable
  • cache-manager
  • cacheable-request
  • @cacheable/node-cache
  • @cacheable/memory
  • @cacheable/utils
  • ecto

Researchers also identified compromised packages associated with organizations including Deliveroo, OneReach, Picsart, and Qlik, illustrating how rapidly the attack spread across the JavaScript supply chain.

Advertisement

Shai-Hulud malware uses npm preinstall scripts to steal credentials 

Unlike attacks requiring users to run malicious code manually, this campaign leveraged npm’s preinstall lifecycle hook.

Each affected package contained a new setup.mjs file referenced through the package.json file. During npm install, the script automatically executed before installation completed.

The dropper downloaded the Bun JavaScript runtime before launching an obfuscated payload known as Math_Symbol.js, a 728 KB credential-stealing program.

Researchers found the malware harvested credentials from several sources, including:

  • npm authentication tokens
  • GitHub personal access tokens and GitHub Actions credentials
  • AWS access keys, IAM credentials, EC2 metadata, and Secrets Manager
  • Kubernetes service account tokens and cluster secrets
  • HashiCorp Vault tokens and stored secrets
  • Stripe and Slack API tokens
  • SSH keys, private certificates, Terraform state files, Docker credentials, VPN configurations, and numerous .env files

The malware encrypted collected data before exfiltrating it to a public GitHub repository. 

Researchers also observed worm-like behavior designed to infect additional npm packages belonging to maintainers who installed compromised dependencies, allowing the campaign to expand rapidly across the ecosystem.

How organizations should respond to the Shai-Hulud attack 

Organizations that installed or built software using affected package versions should assume credentials and development environments may have been exposed until proven otherwise. 

  • Identify and remove affected package versions, including transitive dependencies, from development, build, and CI/CD environments.
  • Rotate all potentially exposed credentials, including npm, GitHub, cloud, Kubernetes, Vault, and API tokens, and invalidate active sessions where appropriate.
  • Rebuild affected developer workstations and CI/CD runners from trusted images, then scan for indicators of compromise and unauthorized outbound activity.
  • Review GitHub Actions workflows, build logs, package publishing activity, and software releases created during the exposure window for signs of unauthorized changes.
  • Strengthen software supply chain security with DevSecOps tools, software composition analysis (SCA), dependency monitoring, version pinning, package allowlisting, and trusted internal package repositories. 
  • Enforce phishing-resistant MFA, hardware security keys, least-privilege access, and stronger controls around source code repositories and package publishing workflows.
  • Test incident response plans with software supply chain attack scenarios, including dependency compromise, credential rotation, development environment recovery, and secure software rebuilds. 
Advertisement

Taking these steps can help organizations reduce exposure from the current attack while strengthening the resilience of their software supply chain against future compromises. 

Bottom line

This campaign reinforces that software supply chain security is a business risk, not just a development concern. 

As software ecosystems become increasingly interconnected, governance, visibility, and secure development practices are becoming essential components of enterprise resilience. 

Building resilience against threats starts with adopting a comprehensive approach to software supply chain security. 

Ken Underhill

Ken Underhill is an award-winning cybersecurity professional, bestselling author, and seasoned IT professional. He holds a graduate degree in cybersecurity and information assurance from Western Governors University and brings years of hands-on experience to the field.

eSecurity Planet Logo

eSecurity Planet is a leading resource for IT professionals at large enterprises who are actively researching cybersecurity vendors and latest trends. eSecurity Planet focuses on providing instruction for how to approach common security challenges, as well as informational deep-dives about advanced cybersecurity topics.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.