Join our Newsletter — 33% off our NHI Course

Notifications
Clear all

Shai-Hulud 2 and npm secrets theft: what teams need to do


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 17031
Topic starter  

TL;DR: Shai-Hulud 2 is propagating through hundreds of npm packages with trojanised preinstall scripts that steal API tokens, SSH keys, cloud credentials, and environment secrets before exfiltrating them to attacker-controlled GitHub repositories, according to Apiiro. Secret exposure now collapses into pipeline compromise, not just code tampering.

NHIMG editorial — based on content published by Apiiro: Shai-Hulud 2 and npm secret theft across the npm ecosystem

By the numbers:

  • When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes and as quickly as 9 minutes in some cases.

Questions worth separating out

Q: What breaks when malicious npm packages execute during CI/CD installs?

A: The main failure is that package installation becomes code execution inside a trusted build context.

Q: Why do developer secrets make supply chain incidents much harder to contain?

A: Because developer secrets often act like non-human identities with broad runtime reach.

Q: How do security teams know when secret sprawl is becoming unmanageable?

A: When they cannot confidently answer where each secret exists, which workloads depend on it, and how quickly it can be retired without breaking business services.

Practitioner guidance

What's in the full analysis

Apiiro's full article covers the operational detail this post intentionally leaves for the source:

  • Package-by-package indicators of compromise and the specific npm versions implicated in the campaign
  • Step-by-step response guidance for validating whether Bun payloads executed in developer or CI environments
  • Concrete repository and workflow artefacts to search for, including structured secret dumps and malicious .github/workflows files
  • Apiiro's recommended hardening measures for CI, dependency handling, and secret handling in active delivery pipelines

👉 Read Apiiro's analysis of Shai-Hulud 2 and npm secret theft →

Shai-Hulud 2 and npm secrets theft: what teams need to do?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
Share: