Join our Newsletter — 33% off our NHI Course
Home› NHI Breaches› ChainDrop npm Worm 2026: How One Maintainer Account…
Breach analysis Incident: 4 Aug 2026

ChainDrop npm Worm 2026: How One Maintainer Account Spread a Credential Stealer to 400+ Packages in Hours

← All NHI breaches
By Lalit Choda, NHI Mgmt Group Updated 26 September 2026 10 min read
On this page

On 4 August 2026, a malicious release of keyv, an npm package with around 150 million weekly downloads, kicked off one of the fastest supply chain worms yet seen. Within about four hours, researchers counted 444 compromised packages and 2,212 malicious versions. The worm, named ChainDrop because it uses the Ethereum blockchain for command and control, stole npm tokens, GitHub tokens, CI secrets, cloud keys and even AI coding tool credentials from every machine that installed it, then used the stolen publishing tokens to infect more packages. It descends from the Shai-Hulud family, and it shows how a single maintainer identity can become a distribution channel for credential theft across the ecosystem.

Key takeaways

  • The attacker took over maintainer Jared Wray's GitHub account, pushed malicious files to keyv's main branch and let the project's own release workflow publish [email protected] at 09:35 UTC on 4 August 2026, using npm trusted publishing.
  • StepSecurity counted 444 packages and 2,212 malicious versions by 13:20 UTC. Headline victims included keyv, flat-cache and file-entry-cache, each with close to 150 million weekly downloads.
  • The payload harvested npm and GitHub tokens, AWS, GCP and Azure credentials, Kubernetes and Vault tokens, SSH keys, GitHub Actions secrets scraped from runner memory, and AI tool credentials for Claude, Codex and Cursor.
  • It spread by republishing every package the stolen npm token could write to, and planted persistence in .vscode/tasks.json and Claude Code's .claude/settings.json.
  • Lesson: trusted publishing and provenance prove where a package was built, not that the maintainer identity behind it is safe. Publishing identities, CI secrets and developer tokens need the same protection as production credentials.

At a glance

Organisation(s)npm ecosystem; keyv and cacheable projects (maintainer Jared Wray) and more than a dozen other publishers; developers and CI systems that installed affected versions
WhenInfrastructure prepared from May 2026; malicious publishing on 4 August 2026
AttackerUnconfirmed; the malware shares code lineage with the published Shai-Hulud toolkit, and Palo Alto Networks Unit 42 cannot yet say whether TeamPCP or another group operates it
Entry pointA compromised maintainer GitHub account used to push a poisoned commit and trigger a legitimate release workflow
Identities abusedMaintainer GitHub account, GitHub Actions OIDC trusted publishing, stolen npm publishing tokens, GitHub tokens, CI runner secrets, cloud, Kubernetes and Vault credentials, AI coding tool credentials
Impact444 packages and 2,212 malicious versions according to StepSecurity; about 2 billion monthly downloads across affected packages according to The Register and CSO Online
CategoryNHI (publishing tokens, CI and cloud secrets), software supply chain

What happened

According to StepSecurity's timeline, a poisoned commit was pushed to the jaredwray/keyv repository at 09:02:37 UTC on 4 August 2026. At 09:35 UTC, [email protected] was published through the project's GitHub Actions workflow using OIDC trusted publishing, so the package carried the same trusted build path as a genuine release. Socket's detection flagged it about six minutes later. By 09:38 UTC a package from an unrelated publisher had been infected, showing the worm was already spreading with stolen tokens, and the cacheable family followed between 10:09 and 10:14 UTC.

CSO Online reported that the maintainer, Jared Wray, had used OpenID Connect with npm and one-time codes for GitHub rather than long-lived static tokens, yet attackers still gained access to his GitHub account. According to Aikido Security, as quoted by CSO Online, they "pushed malicious files directly to the main branch and then immediately cut a new release." Wray regained access at around 20:00 UTC and said he was "doing a full audit". Microsoft's analysis says that "Evidence points towards stolen maintainer credentials as the attack vector for initial compromise."

The malicious versions added a preinstall script that runs setup.mjs. This downloads the legitimate Bun JavaScript runtime from its official GitHub releases and uses it to run a heavily obfuscated second stage of 727,680 bytes, according to StepSecurity. That payload searches the machine for secrets. StepSecurity lists npm tokens, GitHub personal access tokens, AWS keys, GCP service accounts, Azure credentials, Kubernetes tokens, Vault credentials, Slack cookies, Docker configuration, SSH keys and, "new for this generation", AI tool credentials such as .claude/credentials.json, .codex/auth.json, .cursor/credentials.json, .openai/auth.json and .anthropic/auth.json. On GitHub Actions runners, it dumps the memory of the Runner.Worker process and searches it for secrets injected into the job, and Socket reports it also targets GitHub Actions OIDC.

Stolen data is encrypted and sent to attacker servers whose addresses are stored in an Ethereum smart contract. Changing the C2 domain needs only one blockchain transaction; Unit 42 observed exactly that on 4 August. As fallbacks, the worm creates public GitHub repositories, which Microsoft says carry the description "Shai-Hulud: Here We Go Again", and uses workflow artifacts and commit messages to leak tokens.

Researchers named the campaign ChainDrop "because this new version uses the Ethereum blockchain for command and control, a technique known as EtherHiding," according to CSO Online. Unit 42 traces its infrastructure back to May 2026, with the earliest compromised repository created on 11 May, C2 domains registered on 22 May and the Ethereum contract deployed on 25 May.

Timeline

DateEvent
11 May 2026Earliest compromised repository linked to the campaign created, according to Unit 42.
22 to 25 May 2026C2 domains registered and Ethereum resolver contract deployed.
4 August 2026, 09:02 UTCPoisoned commit pushed to jaredwray/keyv.
4 August 2026, 09:35 UTC[email protected] published through GitHub Actions trusted publishing.
4 August 2026, 09:38 UTCFirst package from an unrelated publisher infected; automated spread begins.
4 August 2026, 13:20 UTCStepSecurity counts 444 packages and 2,212 malicious versions.
4 August 2026, around 20:00 UTCJared Wray regains access to his account.
4 to 6 August 2026Analyses published by Microsoft, StepSecurity, Socket, Datadog and Unit 42; Datadog reports a new C2 domain in the smart contract on 5 August.

How it happened: the identity attack path

  1. Maintainer identity taken over. The attacker gained access to the maintainer's GitHub account despite the use of OIDC for npm and one-time codes for GitHub.
  2. Trusted pipeline abused. A commit to the main branch triggered the project's own release workflow, which published to npm through OIDC trusted publishing. No npm token had to be stolen for the first release.
  3. Secrets harvested at install time. The preinstall hook ran on every developer machine and CI runner that installed an affected version, collecting tokens, keys and cloud credentials from files, environment variables and process memory.
  4. Stolen publishing tokens reused. The worm "enumerates every package the victim can publish", injects its payload, increments the patch version and republishes, as StepSecurity describes. Each new victim with publishing rights became a new source of infection.
  5. Provenance kept intact. Unit 42 found one variant used GitHub Actions trusted publishing to obtain npm credentials and published with valid Sigstore provenance.
  6. Persistence in developer tools. Malicious tasks in .vscode/tasks.json run when a folder is opened, and a SessionStart hook in .claude/settings.json runs when Claude Code starts.
  7. Revocation trap. Microsoft reports a token-monitor component with "a destructive handler if the monitored token is revoked", so responders need to clean hosts before revoking.

Impact

  • Packages: 444 packages and 2,212 malicious versions according to StepSecurity; Microsoft and Unit 42 report more than 400 packages.
  • Reach: figures vary by source. The Register and CSO Online put combined downloads at about 2 billion a month; Unit 42 says hundreds of millions weekly; Socket's early analysis of the first wave described tens of millions of weekly downloads.
  • Exfiltration repositories: Unit 42 identified 453 public exfiltration repositories across five accounts.
  • Credentials: Microsoft advises that any developer workstation or build runner that installed an affected version with lifecycle scripts enabled be treated as potentially compromised.

What this means for NHI governance

ChainDrop is a machine identity problem from start to finish. The first release came from a hijacked maintainer account driving a legitimate CI workflow. Every later release came from stolen npm publishing tokens. The payload's shopping list is a catalogue of non-human identities: cloud keys, Kubernetes service account tokens, Vault tokens, CI secrets, SSH keys and, increasingly, the credentials of AI coding assistants.

Two points stand out. First, trusted publishing and signed provenance are valuable, but they attest to the build path, not to the intent of whoever controls it. If the maintainer account or workflow is compromised, the malicious package arrives with valid provenance. Second, the worm targets CI runners directly, reading secrets from memory. Any secret injected into a build job is only as safe as every dependency installed in that job.

ChainDrop follows the Shai-Hulud campaign and the Miasma and Hades worms, each of which turned developer tokens into a means of spreading.

Recommendations

  • Disable install scripts in CI. Use --ignore-scripts where possible and allow lifecycle scripts only for packages that need them.
  • Delay new releases. Configure a minimum release age of several days for dependency updates, and confirm your package manager version actually enforces it.
  • Protect release workflows. Require reviewer approval for release jobs, protect main branches and alert on force pushes and tag deletions.
  • Minimise secrets in build jobs. Give each job only the credentials it needs, and prefer short-lived federated credentials. See the Cloud Workload Identity Guide and NHI Authentication Guide.
  • Clean before revoking, then rotate everything. Remove persistence from .vscode and .claude folders and other artifacts, then rotate npm, GitHub, cloud, Kubernetes, Vault, SSH and AI tool credentials the host could reach. Challenges of Rotating NHIs explains why this is hard at scale.
  • Inventory publishing identities. Know which people and tokens can publish each package you own, and remove any that are not needed, following the NHI Lifecycle Management Guide.

Frequently asked questions

What is the ChainDrop npm worm?

ChainDrop is a self-propagating credential-stealing worm that compromised more than 400 npm packages on 4 August 2026, starting with keyv. It is related to the Shai-Hulud malware family and uses an Ethereum smart contract to find its command-and-control servers.

How did ChainDrop spread?

It stole npm publishing tokens from machines that installed an infected package, then downloaded every package those tokens could publish, injected its code and released new versions.

Did trusted publishing stop ChainDrop?

No. The first malicious keyv release was published by the project's own GitHub Actions workflow using trusted publishing, after the attacker pushed a commit from the maintainer's compromised account. Unit 42 also found a variant that published with valid provenance.

Shai-Hulud npm campaign · Miasma and Hades worms · Mastra npm supply chain attack · Leaked SpotBugs token · CI/CD pipeline exploitation · NHI breaches

How NHI Mgmt Group can help

Securing Non-Human Identities (NHIs), including AI agents, is becoming increasingly crucial as attackers target publishing tokens, CI secrets, cloud credentials, API keys and AI tool tokens. Our NHI Foundation Level Training Course gives teams the practical grounding to find, govern and protect these identities.

References

Explore further

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Written and reviewed by Lalit Choda, NHI Mgmt Group. Last updated 26 September 2026.
    Based on the public sources listed under References. Details may change as investigations continue.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org