How the 'ChainDrop' Worm Weaponized Trusted npm Packages to Steal Developer Credentials
A self-propagating malware variant compromised over 400 widely used JavaScript packages, exploiting valid cryptographic signatures to bypass automated security checks.
By Lila Morgan
- Security Tooling Vendors
- Argue that runtime defense and strict CI/CD isolation are necessary because static analysis and provenance checks can be bypassed.
- Open-Source Maintainers
- Highlight the unsustainable burden placed on unpaid volunteers to secure critical infrastructure against highly sophisticated attacks.
- Enterprise Security Teams
- Focus on the need for zero-trust environments, aggressive credential rotation, and limiting the blast radius of compromised developer workstations.
At a glance
- The ChainDrop worm compromised 444 npm packages and 2,212 versions in under four hours.
- Attackers hijacked the GitHub account of a primary maintainer to push malicious code through legitimate release workflows.
- The poisoned packages carried valid SLSA provenance attestations, bypassing automated security checks.
- The malware steals cloud and infrastructure credentials, using them to automatically infect other repositories.
Why it matters now
This attack demonstrates that cryptographic signatures and automated security checks cannot protect software if the human identities controlling them are compromised. Developers and enterprises must assume their build environments are hostile and aggressively limit the lifespan and scope of their credentials.
On August 4, 2026, a self-propagating worm named "ChainDrop" ripped through the Node Package Manager (npm) registry, poisoning 444 packages and 2,212 versions in under four hours. The attack hijacked some of the most heavily trafficked infrastructure in the JavaScript ecosystem, including the keyv storage library and flat-cache, which collectively see hundreds of millions of weekly downloads.[1][2]
Unlike typical malware that relies on typosquatting or obscure packages, ChainDrop compromised the primary maintainer of keyv. By pushing malicious files directly to the repository's main branch and immediately cutting a new release, the attackers weaponized the project's own automated workflows.[5]
This mechanism highlights a critical blind spot in modern supply chain security marketing. The poisoned versions were published to npm with valid SLSA provenance attestations, cryptographically signed by GitHub Actions. While provenance proves that a specific commit was built by a specific workflow, it cannot prove that the commit itself was authorized or benign.[2]

The attack, identified as a variant of the "Mini Shai-Hulud" malware family, executed its payload through a preinstall lifecycle hook. This abuses a legitimate npm feature that runs arbitrary commands before a package is fully installed, requiring zero interaction from the developer beyond running a standard npm install command.[3][4]
Once triggered, the dropper script—typically named setup.mjs—downloads a legitimate Bun JavaScript runtime alongside 710 kilobytes of heavily obfuscated second-stage code. This cross-platform payload targets Linux, macOS, and Windows environments, scanning developer workstations and continuous integration (CI/CD) pipelines for high-value secrets.[1][3]
The malware systematically harvests npm tokens, GitHub credentials, Amazon Web Services (AWS) keys, Kubernetes secrets, and HashiCorp Vault parameters. It also targets communication and payment infrastructure, scraping Slack and Stripe tokens from local environments.[5]

After encrypting the stolen data using embedded RSA-4096 public keys, the worm exfiltrates the secrets to dynamic HTTPS endpoints or public GitHub repositories. In a nod to previous campaigns, attackers labeled these dead-drop repositories with the description "Shai-Hulud: Here We Go Again."[1][5]
After encrypting the stolen data using embedded RSA-4096 public keys, the worm exfiltrates the secrets to dynamic HTTPS endpoints or public GitHub repositories.
What elevates ChainDrop from a standard infostealer to a supply chain crisis is its automated propagation engine. After obtaining a developer's npm publishing token, the worm enumerates every other package that the compromised identity has the rights to modify.[1]
It then downloads the latest tarballs for those packages, inserts the malware and setup loader, increments the patch version, and republishes the modified packages back to the npm registry. This automated republication allowed the total number of malicious iterations to exceed 2,200 in a matter of hours.[1][2]

The worm also leverages stolen GitHub credentials to establish persistence in source code repositories. It injects configuration files for AI coding assistants like Claude and IDEs like Visual Studio Code directly into the codebase.[1][4]
By committing these hook files—often attributed to automated bot accounts to evade casual scrutiny—the attackers created an additional developer-to-developer infection path. Opening a repository checkout in a configured editor could trigger the payload even without running an npm install command.[4]
Security researchers note that dependency scanners often fail to detect these source-level hooks, as they look for known malicious packages rather than poisoned local configuration files. This technique mirrors earlier attacks targeting AI coding agents, demonstrating a shift toward exploiting developer productivity tools.[4]
The fallout from the ChainDrop campaign has forced a massive remediation effort across enterprise software environments. Organizations using affected packages, which include major platforms like Deliveroo and Qlik, must assume that any credentials present on infected machines have been compromised.[5]

Incident response teams advise developers to isolate affected systems immediately. Rather than simply deleting the malware, teams must preserve package tarballs, npm logs, and CI runner images to bound the exposure window and understand exactly what was stolen.[1]
Rebuilding CI runners, rotating all potentially exposed credentials, and auditing GitHub repositories for anomalous commits are now mandatory steps for affected organizations. The incident serves as a stark reminder that cryptographic signatures and automated checks are only as trustworthy as the human identities that control them.[1][6]
Terms to know
- SLSA Provenance
- A security framework that provides cryptographically verifiable records of how a software package was built, though it does not guarantee the code is harmless.
- Preinstall Hook
- A script defined in a package's configuration that automatically executes before the package is fully installed, often abused by malware to run code without user interaction.
- Tarball
- A compressed archive file format used to bundle multiple files together, commonly used for distributing software packages in registries like npm.
- Worm
- A type of self-propagating malware designed to spread automatically across networks or systems without requiring user intervention.
The backstory
August 4, 2026 (Early Morning)
Attackers compromise the GitHub account of the primary maintainer for the keyv package ecosystem.
August 4, 2026 (5:39 AM EST)
Security monitoring tools detect the first wave of malicious packages being published to the npm registry.
August 4, 2026 (Mid-Morning)
The ChainDrop worm automatically propagates, poisoning over 2,200 versions across 444 packages in under four hours.
August 5, 2026
Security vendors release detailed analyses of the Mini Shai-Hulud variant and its credential-stealing capabilities.
Different angles
Security Tooling Vendors
Argue that the industry's reliance on static analysis and provenance is insufficient.
Security vendors emphasize that because ChainDrop used valid cryptographic signatures and legitimate build pipelines, organizations must adopt runtime behavioral monitoring. They argue that static analysis and supply chain attestations are easily bypassed when a maintainer's identity is compromised, making strict network isolation for CI/CD environments necessary to catch malicious execution as it happens.
Enterprise Security Teams
Focus on blast-radius reduction and zero-trust architectures.
Enterprise defenders argue that developer workstations and CI runners are inherently high-risk environments and should not hold long-lived, overly permissive credentials. Their priority is enforcing short-lived tokens and zero-trust architectures to limit what a worm can steal, assuming that a breach of the software supply chain is inevitable.
Still unresolved
- The exact identity of the threat actors behind the ChainDrop campaign, though the malware shares lineage with the Shai-Hulud family.
- The full extent of secondary breaches caused by the exfiltrated AWS, Kubernetes, and HashiCorp Vault credentials.
Questions readers ask
How do I know if my project is affected by ChainDrop?
Check your dependency tree for compromised packages like keyv, flat-cache, or cacheable published on or after August 4, 2026. Security scanners and npm audit tools have been updated to flag the malicious versions.
Why didn't provenance checks block the malware?
The attackers compromised the maintainer's account and used the project's legitimate GitHub Actions workflows to build the release. Provenance proves the code came from the official workflow, but cannot detect that the commit itself was malicious.
What should I do if an infected package was installed?
Treat the machine as fully compromised. Isolate the system, revoke and rotate all credentials (npm, GitHub, AWS, Vault), and rebuild your CI runners from clean images.
Sources
[1]SecurityWeekOpen-Source Maintainers
ChainDrop Worm Hits 400+ npm Packages with Two Billion Monthly Installs
Read on SecurityWeek →[2]StepSecuritySecurity Tooling Vendors
ChainDrop npm worm: 444 packages and 2212 versions poisoned
Read on StepSecurity →[3]Elastic Security LabsSecurity Tooling Vendors
Elastic Security Labs identified the return of Shai-Hulud
Read on Elastic Security Labs →[4]SafeDepSecurity Tooling Vendors
An npm worm published 2234 poisoned versions across 444 package names
Read on SafeDep →[5]Infosecurity MagazineEnterprise Security Teams
ChainDrop Worm Hits 400+ npm Packages with Two Billion Monthly Installs
Read on Infosecurity Magazine →[6]DeepwatchSecurity Tooling Vendors
Prevent keyv npm supply chain attacks
Read on Deepwatch →
Comments
Every angle. Every day.
Get technology stories with full source coverage and perspective breakdowns delivered to your inbox.







