← Back to Daily Briefing (#AI_Security)

A critical supply chain compromise targeting the npm ecosystem was identified on August 4, 2026, following the takeover of a prominent maintainer's account. Attackers injected a malicious preinstall hook into several high-profile packages, including keyv and cacheable. This hook executes setup.mjs, which downloads a standalone Bun runtime to facilitate credential harvesting from environment variables. Designated as the "ChainDrop" or "Shai-Hulud" worm, the malware achieves rapid, autonomous propagation by leveraging stolen Cloud and CI/CD credentials to automatically republish trojanized versions of downstream dependencies back to the npm registry, creating a viral loop of compromise across the global software supply chain.

  • Incident Overview: The ChainDrop/Shai-Hulud Campaign
    • Identified as a sophisticated supply chain worm by Microsoft and Elastic Security Labs.
    • Initiated via the unauthorized takeover of a trusted npm maintainer's account.
    • Primarily targets developer workstations, CI/CD pipelines, and cloud-native environments.
  • Attack Vector: Malicious npm Preinstall Execution
    • Leverages the npm preinstall lifecycle hook to trigger malicious code during package installation.
    • Executes a secondary loader script, setup.mjs, to establish the initial foothold.
    • Downloads and runs a standalone Bun runtime to bypass standard shell-based detection mechanisms.
  • Propagation Mechanics: Automated Credential-Driven Worm
    • Scans environment variables to exfiltrate sensitive Cloud and CI/CD credentials.
    • Uses stolen credentials to autonomously republish malicious updates to the npm registry.
    • Functions as a self-propagating worm, creating a continuous loop of ecosystem infection.
  • Impact and Scale: Ecosystem-Wide Compromise
    • Directly affects core utility packages including keyv, cacheable, and cacheable-request.
    • Spreads to an estimated 400+ derivative packages across the npm ecosystem.
    • Presents a systemic risk to the integrity of software supply chains and automated deployment pipelines.
  • Defensive Actions and Mitigation
    • Audit lockfiles (e.g., package-lock.json) for unauthorized version changes in targeted namespaces.
    • Implement strict environment variable protections and migrate to short-lived, identity-based cloud credentials.
    • Monitor CI/CD logs for unexpected runtime downloads, specifically focusing on the Bun runtime.

Related posts

  1. arcticwolf.com — Active Supply Chain Attack on npm Packages (keyv, cacheable): Immediate Mitigation Required
  2. news.ycombinator.com — Keyv and friends compromised in active Shai-Hulud supply chain attack
  3. Microsoft Security Blog — ChainDrop supply chain compromise: Anatomy of a self-propagating worm
  4. Elastic
  5. Beazley
  6. Socket
  7. Cycode
  8. Cloudsmith

LINK COPIED TO CLIPBOARD