Shai-Hulud 2.0 Malware Compromises 30,000 GitHub Repositories and Steals 500 User Credentials
A significant supply chain security breach has emerged with the discovery of Shai-Hulud 2.0, a sophisticated malware that has compromised over 30,000 GitHub repositories since its emergence on November 24, 2025. This worm-like malware represents a growing threat to the developer ecosystem, specifically targeting the NPM package manager and spreading across multiple platforms, including Maven and OpenVSX.
The attack demonstrates how attackers are increasingly targeting the tools developers rely on daily, stealing critical credentials and sensitive secrets from development environments.
Infection Vectors and Spread
The malware infiltrates systems through poisoned NPM packages, with the primary infection vectors being `@postman/tunnel-agent` version 0.6.7 and `@asyncapi/specs` version 6.8.3, which together account for over 60 percent of all infections.
Once executed during the package installation phase, the malware operates through a pre-install script that runs automatically, establishing persistence and beginning its credential harvesting operations.
The worm exhibits a self-propagating capability, searching for existing GitHub credentials within compromised environments and using them to upload additional malicious repositories, creating a cascading chain of infections.
Credential Harvesting and Data Exfiltration
Wiz.io security analysts noted that the malware has stolen approximately 500 unique GitHub usernames and tokens from the `contents.json` files found across compromised repositories.
Beyond GitHub credentials, the attack has exfiltrated up to 400,000 secrets identified through Trufflehog scanning, though only about 2.5 percent of these are verified as legitimate.
Critically, over 60 percent of leaked NPM tokens remain valid and pose an active risk for further supply chain attacks.
Persistence Mechanisms
The infection mechanism relies on injecting malicious code into the pre-install lifecycle script, which executes during package installation with minimal user awareness.
The malware collects environment variables and system information into an `environment.json` file, creating a detailed fingerprint of each compromised system.
Most infected machines are Linux-based containers within CI/CD environments, with GitHub Actions being the leading targeted platform.
The malware attempts cloud secret extraction from AWS, Google Cloud, and Azure environments, though analysis reveals implementation flaws in this functionality due to missing error handling that prevents proper secret harvesting from multiple cloud providers simultaneously.
This technical oversight inadvertently limited the scope of cloud credential theft, though local secrets and development credentials remain fully compromised across thousands of organizations worldwide.
Implications for the Developer Ecosystem
The Shai-Hulud 2.0 attack underscores the vulnerabilities inherent in the software supply chain, particularly within open-source ecosystems. By compromising widely used packages, attackers can infiltrate numerous projects, leading to widespread data breaches and potential system compromises.
Developers and organizations must exercise heightened vigilance when incorporating third-party packages into their projects. Regular audits of dependencies, monitoring for unusual activity in repositories, and implementing robust security practices are essential to mitigate such threats.
Recommendations for Mitigation
1. Audit Dependencies: Regularly review and update all project dependencies to ensure they are free from known vulnerabilities.
2. Monitor Repository Activity: Keep an eye on your repositories for unexpected changes or additions, such as new repositories or commits that you did not initiate.
3. Implement Multi-Factor Authentication (MFA): Enhance the security of your accounts by enabling MFA, making it more difficult for attackers to gain unauthorized access.
4. Rotate Credentials Regularly: Periodically change your access tokens and passwords to minimize the risk of compromised credentials being exploited.
5. Use Security Tools: Employ tools like Trufflehog to scan your repositories for exposed secrets and take immediate action to secure them.
By adopting these practices, developers and organizations can strengthen their defenses against supply chain attacks and protect their projects from malicious actors.