Skip to content

Build1 publisher2 min readPublished

ChainDrop executes from a checked-in agent config the moment a coding session starts

GitGuardian says the ChainDrop worm reached 444 npm packages by planting a SessionStart hook in Claude Code and a folderOpen task in VS Code, and the publishing credential it steals is used to republish inside the same session.

The Engineer · Build desk

What happened

  • GitGuardian says the ChainDrop worm, a Shai-Hulud variant, hijacked npm publishing access to reach 444 packages downloaded about 2 billion times a month, a count it attributes to Microsoft.
  • Stolen GitHub credentials let the worm push its malicious configuration into branches of any repository the compromised identity can reach.
  • The same sweep hunts npm, GitHub, cloud, Kubernetes and Vault credentials across developer environments and CI/CD systems.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint A rotation window measured in hours arrives too late here. By the time a detector fires, the republished versions are public, and they stay public after the token is invalidated.
  • decision Agent configuration committed to a branch now needs the review and branch protection that build scripts get, because it runs on a colleague's machine when they start a session.
  • exposure Any publishing identity reachable from a laptop or a CI runner is a path into every package its scope covers, so scope width sets the damage.
  • cost The bill lands on downstream consumers, who pull the new version through routine dependency resolution well before the publisher's rotation does them any good.

The write and the run are separate events. A checkout puts a file in the working tree and nothing happens yet. Execution comes with the next ordinary action: GitGuardian says researchers found malicious configuration in Claude Code and Visual Studio Code projects, where a SessionStart hook launched the dropper when an AI coding session began [4][2], and a folderOpen task ran when the developer opened the infected repository [3]. Both triggers sit outside the package install, so controls scoped to install scripts miss them [15].

The GitHub credential is the delivery half. GitGuardian says stolen GitHub credentials let the worm push malicious configuration into branches of repositories the compromised identity can reach [7]. The npm credential is the payload half: on finding usable publishing access, the worm enumerates every package available to that identity, modifies the tarballs, increments their versions and republishes them with the payload [6].

The 444-package count and the figure of roughly 2 billion downloads a month come from Microsoft, cited in GitGuardian's write-up [1]. Divide one by the other and you get about 4.5 million downloads per package per month [14]. That is arithmetic. The packages behind it each carry their own count. The named dependencies include keyv, flat-cache and cache-manager [8], which most projects acquire transitively, and the worm increments the version before republishing, so an install that resolves a range rather than a pinned version can pick up the new release [19].

GitGuardian wrote that "The whole attack is accomplished in seconds" and that there is no meaningful pause between discovery and use [9]. That is the vendor's description of the path, and the post does not include timing measurements [18]. If the credential is found and used inside one session, a rotation triggered by detection lands after the malicious versions are public, and those versions stay published once the token is rotated [16].

The post is also a product page. The controls it names are detection of exposed credentials across the SDLC, remediation prioritised by validity and severity, and Developer Endpoint Protection with AI hooks to prevent agents from accessing secrets [12]. GitGuardian also says the playbook depends on long-lived plaintext credentials that give whatever holds them legitimate-looking authority [11].

Exposure follows the scope of the tokens sitting on developer machines and CI runners. The worm enumerates the package list attached to the identity it steals, so the count of packages at risk equals the count that identity may publish to [17]. GitGuardian says the same sweep also looks for cloud, Kubernetes and Vault credentials [5].

What to watch

  • Whether Claude Code and VS Code require an explicit trust step before running SessionStart hooks or folderOpen tasks that arrived with a branch.
  • Whether Microsoft publishes the package list and per-package download breakdown behind the 444 and 2 billion figures.
  • Whether npm publishing tokens get narrowed so that enumerating and republishing every package in a scope takes more than one stolen identity.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories