Microsoft Releases New Guidance to Combat the Shai-Hulud 2.0 Supply Chain Threat
Microsoft has released detailed guidance on the Shai-Hulud 2.0 supply chain attack, a significant compromise in the cloud-native ecosystem. This attack exploits software development workflows by targeting developer environments, CI/CD pipelines, and…
Microsoft has released detailed guidance on the Shai-Hulud 2.0 supply chain attack, a significant compromise in the cloud-native ecosystem. This attack exploits software development workflows by targeting developer environments, CI/CD pipelines, and cloud-connected workloads to extract sensitive credentials and configuration secrets.
The Shai-Hulud 2.0 campaign is an evolution of previous supply chain attacks, introducing advanced automation, faster propagation, and a broader scope. Threat actors injected malicious code through the preinstall phase of numerous npm packages, bypassing test or security checks. The compromise of maintainer accounts for projects such as Zapier, PostHog, and Postman highlights the attackers' penetration into trusted development infrastructure.
The attack involves manipulating npm packages with a preinstall script named set_bun.js in package.json files. This script installs a Bun runtime if absent and executes bundled malicious code, bun_environment.js , which downloads and installs a GitHub Actions Runner archive. This creates a new GitHub repository with a runner agent labeled SHA1HULUD.
The archived files include TruffleHog, a credential scanning tool, and Runner.Listener executables to query systems for stored credentials. Microsoft Defender detected the campaign through alerts such as suspicious usage of the shred command and the Sha1-Hulud Campaign Detected alert. Some commits to newly created repositories were falsely authored under "Linus Torvalds," emphasizing the need for commit signature verification in development environments.
Microsoft Defender suggests reviewing Key Vault assets for unauthorized access, rotating and revoking exposed credentials, isolating affected CI/CD agents, and prioritizing high-risk attack paths. It is also recommended to remove unnecessary roles and permissions from CI/CD pipelines, focusing on Key Vault access controls.
Microsoft has released detailed guidance on the Shai-Hulud 2.0 supply chain attack, a significant compromise in the cloud-native ecosystem.
For npm maintainers, Microsoft advises implementing trusted publishing, enforcing two-factor authentication for all writes and publishing actions, and using WebAuthn over time-based one-time passwords for 2FA configuration. Enabling cloud-delivered protection and automatic sample submission on Microsoft Defender Antivirus, along with attack surface reduction rules, is crucial for protection against emerging threats.
Indicator Type Description First seen Last seen
setup_bun.js File name Malicious script that installs the Bun runtime Mon, Nov 24, 2025 Mon, Dec 1, 2025
bun_environment.js File name Script facilitating credential gathering and exfiltration Mon, Nov 24, 2025 Mon, Dec 1, 2025
Organizations are encouraged to assess npm package dependencies and implement recommended hardening measures to mitigate risks associated with this campaign.
Based on reporting by GBHackers.
