Sha1-Hulud Supply Chain Attack Returns: 800+ npm Packages and 26,000 GitHub Repositories Compromised in Massive Credential Theft Campaign

  • November 24, 2025

Sha1-Hulud malware

The open-source software ecosystem faces one of its most significant security crises as the Sha1-Hulud malware returns with devastating force, compromising over 800 npm packages and approximately 26,300 GitHub repositories in a campaign threat actors have ominously branded “The Second Coming.” This sophisticated supply chain attack targets high-profile dependencies from major technology organizations including AsyncAPI, Postman, PostHog, Zapier, and ENS Domains, affecting an estimated 132 million monthly downloads and demonstrating alarming evolution in both scale and destructive capabilities.

Unlike previous iterations focused solely on credential theft, this resurgence introduces catastrophic wiper functionality that destroys victim data when exfiltration fails—a terrifying escalation marking a fundamental shift in supply chain attack methodologies. Organizations worldwide that depend on compromised packages now face dual threats: stolen credentials enabling ongoing unauthorized access and potential data destruction that could cripple development operations without warning.

Understanding the Sha1-Hulud Threat: Evolution of a Supply Chain Menace

The Sha1-Hulud malware represents a sophisticated threat specifically engineered to exploit trust relationships within the software supply chain. Named after the massive sandworms from Frank Herbert’s Dune series, this malware burrows through dependency chains to reach countless downstream victims who unknowingly incorporate compromised packages into their projects.

The initial Sha1-Hulud campaign demonstrated how attackers could systematically compromise npm packages to steal developer credentials and API tokens. However, “The Second Coming” iteration showcases significant tactical evolution reflecting lessons learned from initial detection and response efforts. Threat actors behind this campaign clearly studied defensive measures implemented after earlier attacks and adapted their malware to evade detection while expanding impact scope.

The Destructive Fallback Mechanism

The most alarming innovation in this supply chain attack involves aggressive wiper functionality that executes when the malware cannot accomplish its primary credential theft objectives. Security researchers at Aikido Security discovered that if Sha1-Hulud fails to authenticate to GitHub, create repositories for storing stolen data, fetch GitHub tokens, or locate npm tokens, it triggers a catastrophic destruction routine.

This wiper logic systematically attempts to delete every writable file in the victim’s home directory owned by the current user—potentially destroying source code, configuration files, development tools, personal documents, and any other data accessible to the compromised account. The implications are staggering: developers who detect and block credential exfiltration still face complete data loss as the malware burns evidence of its presence while inflicting maximum damage.

This shift from pure information theft to conditional destruction represents a significant escalation in supply chain attack severity. Previous malware variants typically prioritized stealth and persistence to maximize credential harvesting over extended periods. The addition of destructive capabilities suggests threat actors now prioritize impact over subtlety, willing to sacrifice long-term access for immediate disruption when circumstances prevent successful exfiltration.

Technical Analysis: How the Attack Chain Operates

Understanding the technical mechanisms underlying this npm package compromise provides crucial insights for organizations defending against supply chain attacks and developing detection capabilities.

Bun Runtime Exploitation for Evasion

The attack chain begins with a file named setup_bun.js that installs the Bun runtime environment—a modern JavaScript runtime designed as a faster, more efficient alternative to Node.js. By leveraging Bun rather than standard Node.js execution, the malware operates outside traditional detection boundaries that security tools typically monitor.

Many static analysis solutions, dependency scanners, and runtime security monitoring tools focus specifically on Node.js execution patterns and behaviors. The shift to Bun allows Sha1-Hulud to evade these controls, executing malicious payloads in an environment that security tools may not adequately cover. This evasion technique demonstrates sophisticated understanding of security tool limitations and represents a concerning trend where attackers leverage emerging technologies before defensive capabilities mature.

Once Bun is installed, the malware executes its core payload from bun_environment.js—a deliberately innocuous filename designed to blend with legitimate build configuration or environment setup scripts that developers might overlook during code reviews or security audits.

TruffleHog Integration for Credential Harvesting

After establishing initial access through compromised npm packages, Sha1-Hulud deploys TruffleHog—an open-source tool originally designed for security researchers to detect accidentally committed secrets in code repositories. The irony of using a security tool for malicious purposes underscores how attackers weaponize legitimate security research capabilities.

TruffleHog scans infected environments for API keys, access tokens, credentials, and other secrets that developers frequently store in configuration files, environment variables, or inadvertently commit to version control. The tool’s effectiveness stems from its comprehensive pattern matching capabilities recognizing diverse credential formats across hundreds of services and platforms.

The stolen credentials get exfiltrated to randomly named GitHub repositories created specifically for this purpose, rather than predetermined locations that security researchers could easily identify and monitor. Each malicious repository contains a distinctive description: “Sha1-Hulud: The Second Coming”—enabling security researchers to track the campaign’s scope but providing threat actors with distributed, disposable storage that’s difficult to completely eradicate.

Current estimates suggest approximately 26,300 GitHub repositories contain stolen credentials from this campaign, representing a massive trove of compromised authentication materials that threat actors can leverage for further attacks, unauthorized access, and potential sale on underground markets.

High-Profile Victims: Critical Infrastructure at Risk

The scope of this supply chain attack extends across some of the most widely used open-source packages supporting critical development infrastructure.

AsyncAPI provides essential tools for event-driven architectures. Compromised packages including @asyncapi/cli, @asyncapi/generator, and asyncapi-preview affect development teams relying on these tools for microservices communication and API specification.

PostHog’s open-source analytics platform helps organizations track user behavior. Compromised packages like @posthog/cli, @posthog/node, and posthog-js potentially expose sensitive analytics data and production environments.

Postman packages including @postman/collection-fork and @postman/tunnel-agent create extensive attack surfaces, as developers routinely store API credentials and authentication tokens in Postman collections.

Zapier SDK packages like @zapier/zapier-sdk and zapier-platform-core potentially expose credentials for numerous third-party services connected through Zapier automations, creating cascading compromise opportunities.

ENS Domains packages including @ensdomains/ensjs and @ensdomains/thorin affect Web3 development, potentially exposing private keys, wallet credentials, and smart contract deployment keys—financially catastrophic compromises enabling direct cryptocurrency theft.

Strategic Timing: Racing Against npm Security Improvements

Security researchers note that the timing of this aggressive supply chain attack appears strategically calculated. npm announced plans to revoke all classic authentication tokens on December 9, 2025, transitioning to more secure granular access tokens with fine-grained permissions and shorter lifespans.

Idan Dartikman, co-founder and CTO of Koi Security, observed: “There’s also a big security change coming to NPM, and it is very possible that the threat actor worked fast to infect as many victims as possible before that.” This assessment suggests threat actors recognized that upcoming security improvements would significantly complicate future credential theft operations, motivating an urgent, large-scale campaign to harvest credentials before the window closes.

The aggressive pace and expanded scope of “The Second Coming” reflects desperation to maximize impact before defensive improvements render current techniques less effective. This pattern—threat actors accelerating attacks before anticipated security enhancements—represents a recurring dynamic in cybersecurity where defenders must race to implement protections before adversaries exploit closing windows of vulnerability.

Immediate Response Actions for Organizations

Organizations that use npm packages or maintain JavaScript development environments must implement immediate response measures to address potential compromise from this supply chain attack.

Dependency Auditing and Investigation

Scan all projects for the specific indicators of compromise including setup_bun.js and bun_environment.js files. Automated scanning tools can rapidly inventory these files across large codebases, but manual review of suspicious findings remains essential for confirming malicious intent versus legitimate use of Bun runtime.

Review npm dependency trees for compromised packages identified by security researchers. Tools like npm audit, Snyk, and GitHub’s Dependabot can highlight known vulnerabilities, but this campaign may include packages not yet flagged in public vulnerability databases, requiring careful analysis of dependency chains.

Check GitHub repositories for unexpected creation of repos with “Sha1-Hulud: The Second Coming” in descriptions, indicating credential exfiltration occurred from your environment. Organizations should audit all GitHub organizations they control for suspicious repositories created by authorized accounts without legitimate business justification.

Credential Rotation and Access Review

Rotate all potentially compromised credentials immediately, prioritizing API keys, access tokens, service account credentials, and CI/CD secrets that may have been exposed in affected environments. The broad scope of this campaign suggests assuming compromise until proven otherwise represents the safest approach.

Review access logs for suspicious activity patterns that might indicate stolen credentials are already being exploited. Unusual login locations, unexpected API usage patterns, or anomalous data access could signal ongoing unauthorized access requiring immediate response.

Implement credential management improvements including secrets managers, short-lived tokens, and principle of least privilege to reduce exposure even when credentials are compromised. Organizations should view this incident as a catalyst for comprehensive credential security program enhancements.

CI/CD Pipeline Security Hardening

Audit CI/CD environments where compromised npm packages may have executed during build processes, potentially exposing deployment credentials, cloud service keys, and production access tokens. CI/CD pipelines concentrate valuable credentials making them prime targets for supply chain attacks.

Implement dependency pinning and lock files preventing automatic updates that could introduce compromised package versions without explicit review and approval. While this creates maintenance overhead, it prevents supply chain attacks from automatically propagating through systems.

Deploy runtime security monitoring detecting anomalous behaviors like unexpected network connections, unusual file system operations, or suspicious process executions that might indicate malware activity even when static analysis fails to identify compromised dependencies.

Long-Term Supply Chain Security Strategy

Beyond immediate incident response, organizations must develop comprehensive strategies addressing the systemic vulnerabilities that enable supply chain attacks to succeed at scale.

Dependency Management Discipline

Minimize dependencies by carefully evaluating whether external packages are truly necessary or if functionality could be implemented internally with reasonable effort. Each dependency represents additional attack surface and ongoing security maintenance burden.

Vet packages thoroughly before adoption by researching maintainer reputation, reviewing recent update patterns, checking security history, and examining source code for obvious vulnerabilities or suspicious behaviors. Establishing formal approval processes for new dependencies prevents uncritical incorporation of high-risk packages.

Monitor dependency health continuously tracking metrics like maintenance activity, security responsiveness, and community engagement that indicate whether packages receive adequate care or are trending toward abandonment creating future security risks.

Software Bill of Materials (SBOM) Implementation

Generate comprehensive SBOMs documenting all dependencies, versions, and transitive relationships throughout software portfolios. When supply chain attacks like Sha1-Hulud emerge, SBOMs enable rapid impact assessment identifying which systems incorporate compromised packages.

Automate SBOM analysis integrating vulnerability scanning, license compliance checking, and anomaly detection into continuous integration pipelines, treating supply chain security as integral to software quality rather than afterthought security review.

Share SBOMs with customers enabling downstream organizations to assess their own exposure when supply chain attacks affect vendors’ products, improving ecosystem-wide incident response coordination.

Conclusion: Defending Against Evolving Supply Chain Threats

The Sha1-Hulud “Second Coming” campaign represents a watershed moment in supply chain attack evolution, demonstrating that threat actors are willing to escalate from stealthy credential theft to destructive data wiping when their primary objectives are frustrated. The compromise of over 800 npm packages affecting 132 million monthly downloads underscores the systemic risks inherent in modern software development’s heavy reliance on open-source dependencies.

Organizations can no longer afford to treat supply chain security as secondary concern addressed through periodic dependency updates and reactive vulnerability patching. The sophistication, scale, and destructive capabilities demonstrated by this campaign demand proactive security programs encompassing dependency vetting, continuous monitoring, rapid incident response, and defense-in-depth strategies that assume compromise will eventually occur despite best prevention efforts.

As npm implements enhanced security measures and the development community responds to this incident, threat actors will undoubtedly adapt their techniques, seeking new evasion methods and attack vectors. The fundamental challenge—balancing the tremendous productivity benefits of open-source software reuse against the security risks of trusting code from external sources—will persist, requiring ongoing vigilance, investment, and collaboration across the global software development community.