ChainDrop worm crawls into npm supply chain, evades standard defenses

Summary: Shai-Hulud variant poisons 444 packages, spreads via tarballs and dev-tool hooks

ChainDrop Worm Poisons Hundreds of npm Packages and Finds a New Way Around Supply Chain Defenses

A new variant of the Shai-Hulud malware campaign is forcing the open-source community to confront an uncomfortable weakness in software supply chain security: verifying the source repository is no longer enough to verify the software developers actually install.

The campaign, dubbed ChainDrop, compromised at least 444 npm packages belonging to multiple publishers, including widely used dependencies such askeyv,flat-cacheandcache-manager. Collectively, the affected packages receive roughly two billion downloads per month, giving the operation potential exposure across an enormous number of JavaScript projects and automated development environments.

What distinguishes ChainDrop from more familiar npm compromises is not simply its scale. The worm uses multiple propagation mechanisms designed to exploit the gap between source repositories, published package artifacts and increasingly powerful developer tools. In some cases, reviewing a project’s GitHub source code may reveal nothing unusual because the malicious payload exists only inside the package tarball distributed through npm. In others, merely opening a compromised repository branch in tools such as Visual Studio Code or Claude Code can trigger malicious configuration and begin another round of credential theft.

The result is a supply chain attack that targets not only software dependencies, but the development environment surrounding them.

The attack lives outside the source repository

Developers often treat a project’s source repository as the authoritative representation of a package. When suspicious behavior appears in an npm dependency, one of the first investigative steps is naturally to inspect the corresponding GitHub repository and determine what changed.

ChainDrop deliberately undermines that assumption.

Once executed, the malware searches the victim’s environment for npm authentication tokens with publishing privileges. It also hunts for cloud credentials and other secrets in shell configuration files, environment variables and even live memory, encrypting stolen information before transmitting it to attacker-controlled infrastructure.

If ChainDrop discovers an npm token with sufficient privileges, it retrieves the tarballs for packages the compromised account is authorized to publish. Instead of modifying the corresponding source repository, the malware reconstructs those package archives and inserts its own payload before publishing the poisoned artifacts.

The source repository can consequently remain clean while the package distributed to developers is malicious.

That discrepancy attacks one of the basic trust relationships in open-source development. A security team may review Git history, examine commits and verify that maintainers have not introduced suspicious code, yet still miss the compromise because the artifact available from the package registry no longer corresponds exactly to the repository being inspected.

ChainDrop attacks developer tools as well

The worm’s second propagation mechanism is arguably even more concerning because it exploits configuration features inside tools developers routinely trust.

ChainDrop searches infected systems for GitHub credentials. When it finds them, it queries the GitHub API to enumerate repositories and branches accessible to the compromised identity. The malware can then insert malicious configuration into those branches.

The relevant files include.vscode/tasks.jsonand.claude/settings.json, configuration mechanisms associated with Visual Studio Code and Claude Code. Once a developer checks out and opens an affected branch, background functionality can execute the malicious instructions, harvest credentials and continue the infection cycle.

This means a developer does not necessarily need to executenpm installon a known malicious package to become part of the propagation chain. Opening a repository inside a trusted development tool can itself become the trigger.

The attack therefore expands the definition of executable content inside a software project. Source files are no longer the only elements security teams need to evaluate. IDE tasks, agent configuration, build hooks and other repository-controlled metadata can influence what executes on a developer workstation.

That distinction becomes particularly important as AI coding tools receive broader permissions to inspect repositories, execute commands and modify development environments.

CI/CD automation amplifies the problem

ChainDrop also benefits from the automation that defines modern software development. npm dependencies are deeply integrated into CI/CD systems, where applications may be rebuilt and deployed automatically whenever dependencies change.

If a project accepts compatible patch releases without explicitly pinning versions, a compromised package can enter the build process without anyone intentionally selecting it. An automated pipeline retrieves what it believes is a legitimate dependency, executes installation behavior and potentially exposes credentials available inside the build environment.

Those credentials can be extremely valuable. CI/CD runners frequently hold package publishing tokens, GitHub credentials, cloud authentication, deployment secrets and access to production infrastructure. A worm capable of harvesting those identities does not merely compromise the application currently being built; it potentially acquires the credentials required to compromise additional repositories and packages.

This creates a self-reinforcing propagation mechanism. One poisoned dependency reaches a CI environment, credentials are stolen, additional packages are modified and those packages subsequently reach more developers and pipelines.

The architecture resembles traditional worm behavior, but the network being traversed is not composed primarily of vulnerable computers. It is composed of trusted relationships between developers, package registries, repositories and automation systems.

Deep dependencies make the blast radius difficult to understand

The packages targeted by ChainDrop also illustrate why modern supply chain incidents are difficult to assess quickly. Dependencies such askeyv,flat-cacheandcache-managermay sit deep inside dependency trees rather than being packages that every application developer deliberately installs.

A development team can therefore consume a compromised package without recognizing its name.

Modern JavaScript applications routinely depend on hundreds or thousands of packages once transitive dependencies are included. One direct dependency may depend on another library, which depends on several more, creating a graph that developers rarely inspect manually.

The practical security question is consequently not simply, “Did we install one of these packages?” Organizations need to determine whether any affected version existed anywhere inside their dependency graph, build environment or cached artifacts during the period of compromise.

The infected packages identified in the campaign have since been removed from npm, but removal does not reverse installations that already occurred or invalidate credentials potentially stolen from affected environments.

A clean repository is no longer sufficient evidence

Perhaps the most important technical lesson from ChainDrop is the distinction between source provenance and artifact provenance.

A Git repository records what developers committed. A package registry distributes what users actually install. Those two things are expected to correspond, but that relationship itself must be verified.

ChainDrop demonstrates what happens when attackers compromise the publication layer rather than the source layer. The repository remains trustworthy while the distributed artifact does not.

This creates problems for security processes built primarily around source-code review. Reviewing commits, requiring pull-request approval and protecting repository branches are still important, but none of those controls necessarily detect a malicious tarball produced outside the legitimate build pipeline.

Stronger software supply chain architectures increasingly address this problem with reproducible builds, signed artifacts, provenance attestations and trusted publishing mechanisms. The objective is to establish a verifiable chain connecting source code, the environment that built it and the artifact ultimately delivered to users.

Without that connection, the package registry effectively asks developers to trust that the tarball corresponds to the source they reviewed.

ChainDrop exploited precisely that assumption.

Developer configuration is becoming executable infrastructure

The campaign also exposes a newer problem created by increasingly sophisticated development environments.

Modern repositories contain far more than application source code. They include CI workflows, IDE settings, container configurations, development environments, automated tasks and AI-agent instructions. Some of those files can cause commands to execute automatically or influence tools with substantial access to the developer’s workstation.

Security teams historically treated configuration files as lower-risk artifacts than scripts or binaries. That distinction is becoming increasingly difficult to defend.

A.vscode/tasks.jsonfile can define tasks executed by an IDE. AI coding tools can similarly consume repository-specific configuration while operating with permission to execute shell commands, read files or modify code.

In practical terms, repository configuration has become part of the executable attack surface.

ChainDrop appears to be one of the first campaigns to exploit that gap at significant scale. It is unlikely to be the last.

Detecting an infection requires looking beyond the main branch

Organizations concerned about exposure should examine their environments for compromised package versions and unexpected developer-tool configuration. The Register reports that developers should specifically investigate unfamiliar.claude/settings.jsonand.vscode/tasks.jsonfiles. Importantly, those checks should cover every branch, not simply the default branch.

That detail matters because attackers can hide malicious configuration in branches developers may only access occasionally. A cleanmainbranch does not prove the repository is safe if another branch contains a trigger waiting for someone to check it out.

Potentially exposed npm and GitHub credentials should also be treated as compromised rather than merely monitored. Removing the malicious package does nothing to revoke secrets that may already have been exfiltrated.

For CI/CD environments, that may mean rotating package publishing tokens, GitHub credentials, cloud secrets and other identities accessible to affected jobs.

Organizations should also reconsider whether automated builds genuinely require long-lived npm tokens with broad publishing permissions. Short-lived credentials and trusted publishing mechanisms can substantially reduce what malware can steal and reuse.

Dependency scanners are solving only part of the problem

Traditional software composition analysis is largely designed to answer questions about the dependencies contained within an application: which packages are installed, which versions are vulnerable and whether known malicious components are present.

ChainDrop exposes attack paths that sit adjacent to that model.

The dangerous component may exist only inside the published tarball. The propagation mechanism may live inside IDE configuration. The credentials enabling the next compromise may reside inside CI memory. The source repository itself may remain perfectly clean.

This means organizations increasingly need to evaluate not only what software they depend on, but how that software is produced, distributed and executed.

Package integrity, build provenance, repository configuration, developer-tool permissions and CI identities are becoming parts of the same security problem.

The software supply chain is becoming an execution graph

ChainDrop ultimately represents a significant evolution of the Shai-Hulud concept because it treats the modern development ecosystem itself as a network through which malware can propagate.

A compromised npm package reaches a developer or CI runner. The malware steals publishing credentials. Those credentials allow additional package artifacts to be poisoned. GitHub credentials provide access to repositories, where malicious IDE or AI-tool configuration can be inserted. Another developer opens the repository, triggering another round of credential theft.

Each trusted relationship becomes the route to the next victim.

The campaign affected 444 packages with a combined download volume measured in billions per month, but the more consequential lesson is architectural.Modern software development depends on an enormous chain of implicit trust between registries, source repositories, automation systems and increasingly autonomous development tools.

ChainDrop found places inside that chain where code could execute without attracting the scrutiny normally applied to application source.

For defenders, the response cannot be limited to adding another malware signature or checking another list of compromised npm versions. The larger adjustment is conceptual:package artifacts must be verified independently, repository configuration must be treated as potentially executable, and developer tools must no longer assume that everything inside a trusted Git repository deserves to be trusted automatically.

The source code may be clean. The repository may look untouched. And the supply chain can still be compromised.

Key facts

  • A malware variant named ChainDrop has infected the npm software supply chain
  • The attack compromised 444 npm packages
  • ChainDrop spreads via tarballs and dev-tool hooks
  • The malware variant is also referred to as a Shai-Hulud variant
  • Standard defenses were evaded by the malware

Why it matters

This incident highlights the persistent and evolving threat to the software supply chain, demonstrating that attackers are finding new ways to compromise widely used package repositories. The compromise of 444 npm packages suggests a broad potential impact across the software development ecosystem, necessitating enhanced vigilance and more sophisticated detection mechanisms for developers and infrastructure providers.