All Posts
AI Engineering October 15, 2026

The Commit Said claude: Inside the Keyv and Cacheable NPM Worm's Trust Chain Abuse

On August 4, 2026, an attacker compromised the npm maintainer account behind keyv and used it to push a trojanized release that carried a valid Sigstore provenance attestation, because the legitimate build pipeline compiled already malicious source. Within a day the worm had spread through stolen publish tokens to at least 444 packages across 1,381 versions, a combined footprint north of 2 billion monthly installs, and planted an autostart hook in .claude/settings.json that fires the moment a developer or an AI coding agent opens a cloned repository. The commits it leaves behind are authored as claude. Here is how the mechanism actually works and what it means for any team treating AI coding tool configuration as a convenience file rather than a credential.

The Commit Said claude: Inside the Keyv and Cacheable NPM Worm's Trust Chain Abuse

Detail Finding
Starting point Compromised GitHub account of the keyv maintainer, August 4, 2026
First malicious release keyv 6.0.0, carrying a valid Sigstore provenance attestation
Spread Stolen npm publish tokens and OIDC trusted publishing, reaching at least 444 packages across 1,381 versions by August 5
Combined footprint Over 2 billion combined monthly installs across affected packages
Credentials targeted npm, GitHub, AWS, GCP, Azure, Kubernetes, HashiCorp Vault, plus Stripe and Slack tokens
AI tooling hook Autostart entries added to .claude/settings.json and .vscode/tasks.json
Commit identity Malicious commits authored as claude, with the message chore: update config
Command and control fallback An Ethereum smart contract supplying a resolvable domain, bypassing simple blocklists

Most npm supply chain writeups this year have followed a familiar shape: a preinstall script, a credential stealer, a blocklisted domain. The keyv and cacheable compromise that started August 4, 2026 follows that shape too, but two details separate it from the pack and are worth understanding on their own terms, not just as another entry in a growing list. First, the worm used a compromised maintainer's own credentials to generate a valid Sigstore provenance attestation for malicious code, which is a direct attack on the specific mechanism built to prevent this exact scenario. Second, it planted autostart hooks that fire specifically when a developer or an AI coding agent opens a cloned repository, and the commits that hook leaves behind are authored as claude.

How a legitimate build pipeline shipped malicious code with a valid signature

Sigstore exists to let a package consumer verify that a given release was actually built from the source it claims to be built from, closing the gap where a compromised registry account could publish something that never went through the real build process. The keyv attack did not need to defeat that verification, because it compromised the maintainer's GitHub account directly and pushed the malicious files straight to the main branch before the legitimate CI pipeline ever ran. The pipeline then built and signed exactly what it was given, which happened to already be trojanized. The resulting release, documented by Socket's research team, carried a technically valid attestation describing a build process that had, in fact, run correctly on malicious input. Provenance tooling verifies that the build happened as described. It cannot verify that the source fed into the build was trustworthy, and this attack is a clean demonstration of exactly that gap.

The propagation mechanism turned every maintainer account into a vector

Once the first release was live, the worm used stolen npm tokens and OIDC trusted publishing credentials, the same mechanism meant to let CI pipelines publish without long lived secrets, to push the same malicious hook into other maintainers' packages and republish them under those maintainers' own trusted identities. Aikido's analysis puts the scope at over 444 packages across 1,381 versions within a day, with a combined footprint above 2 billion monthly installs once the keyv family, cacheable family, and community packages that depend on them are counted. The payload itself downloads a standalone Bun runtime without checksum or signature verification and runs an obfuscated second stage that harvests npm, GitHub, AWS, GCP, Azure, Kubernetes, and HashiCorp Vault credentials, along with Stripe and Slack tokens and a generic regex sweep for private key material on disk. None of that is novel on its own. The scale it reached in roughly 24 hours, through legitimate publishing infrastructure rather than around it, is what makes this one worth a team's attention beyond the standard rotate your credentials advice.

Why the Ethereum fallback matters more than it sounds like it should

A hardcoded command and control domain is something defenders can get blocklisted or taken down through a registrar. This payload's fallback resolves its endpoint by querying an Ethereum smart contract, which lets the attacker change the destination without touching the payload itself and without depending on any single domain registrar's cooperation. Combined with a persistence mechanism, a macOS LaunchAgent or Linux systemd service polling the GitHub API roughly once a minute, the attack is built to survive the first round of a defender's response: blocking one domain or revoking one token does not remove the mechanism that can redirect to a new one.

Why the .claude hook is the detail that should change how you think about AI tool config

The propagation hook commits to up to 50 branches per compromised repository using a stolen token, authored as claude, with the commit message chore: update config, which is designed to blend into a repository's normal activity rather than stand out in a quick scan of commit history. The hooks it plants in .claude/settings.json and .vscode/tasks.json do not require a developer to run npm install at all. They fire the moment someone, or an AI coding agent acting on someone's behalf, opens the cloned repository, which means the actual trigger condition for this payload is broader than the standard install time execution most npm supply chain writeups describe. We covered a related but distinct pattern in the TensorLake compromise from October 8, where AI coding tool configuration files were explicitly named as a target rather than an incidental collateral hit. This attack predates that one by two months and establishes the same pattern earlier: configuration files that AI coding agents read on startup are now a recognized place to plant persistence, not a backwater a defender can safely ignore.

What to actually check and in what order

Check for the affected package versions directly: keyv 6.0.0, flat-cache 6.1.24, file-entry-cache 11.1.6, cacheable 2.5.1, and cache-manager 7.2.10, along with the broader list Socket and Aikido continue to update. Look specifically for a preinstall entry running setup.mjs in any package.json in your dependency tree, and separately, regardless of whether you found that preinstall entry, check .claude/settings.json and .vscode/tasks.json in every repository your team has cloned recently for autostart hooks you did not add. Remove any persistence mechanism, the scheduled task or service polling a stolen token, before rotating credentials, since the specific design intent of that persistence layer is to survive a token rotation that happens while it is still running. Only after that removal is confirmed should you rotate npm, GitHub, cloud, and Vault credentials, and audit your own GitHub account for commits authored as claude that you did not make.

FAQ

Is this the same incident as the TensorLake npm compromise covered elsewhere on this site? No, though they are related. The keyv and cacheable compromise happened August 4, 2026, and is a different, larger scale incident. TensorLake, disclosed October 8, 2026, is a separate package compromise in the same Shai-Hulud attack lineage that explicitly named AI coding tool configuration files as a target, a pattern this earlier incident already established in practice.

How would I know if my team was affected without checking every dependency manually? Search your lockfiles for the specific affected versions listed above, and separately search your cloned repositories for the literal strings setup.mjs in a preinstall script and for unexpected entries in .claude/settings.json or .vscode/tasks.json, since either indicator can be present independent of the other.

Does removing the compromised package version also remove the implant? Not necessarily. If the preinstall script already ran, or if the configuration hook already fired, removing the package afterward does not remove whatever the payload already planted, including the persistence mechanism and any already exfiltrated credentials.

Why does the Ethereum smart contract detail matter for defenders specifically? It means blocking a known bad domain only stops the current configuration, not the attack. The attacker can redirect the command and control endpoint through the smart contract without changing the payload already deployed on compromised machines, so domain blocking alone is not a sufficient containment step.

When this applies to your stack

If your team runs npm install in any CI pipeline that has access to production or near production credentials, verify today whether preinstall and postinstall scripts are disabled by default, since that is the exact mechanism this entire attack family depends on. If your developers use Claude Code, Cursor, or similar tools with configuration or MCP files that grant access to real infrastructure, treat those files with the same handling discipline as a cloud credentials file, including auditing what currently lives in them and whether a compromised workstation would hand an attacker more than it should. Contra Collective helps engineering teams build that credential isolation into their development environment before an incident forces the audit.

[ 02 ] — Keep Reading

More from the lab.

Nov 7, 2026 AI Engineering

Postman's MCP Plugin Installed Itself Into Claude Code and Codex: What the Audit Trail Actually Shows

A developer running Postman Desktop 12.33.4 on macOS found their Claude Code settings and Codex config both quietly enabled with Postman's MCP plugin, logged under a source string that does not appear anywhere in Postman's public plugin repository. The GitHub issue, filed October 25, 2026, has sat open and unanswered. No data breach is proven here, the MCP server failed authentication in the reported case, but the consent gap is real and it is a pattern worth auditing for in your own agentic coding stack regardless of whether this specific vendor is the one that did it to you.

Nov 6, 2026 AI Engineering

Cisco Gave One Engineer Unlimited AI Tokens to Rewrite 98 Percent of Its Legacy Code

Cisco president and chief product officer Jeetu Patel gave engineer Padmanabhan Krishnamurthy, 27, unlimited AI tokens and a self set four week proof period toward a goal of rewriting 98 percent of Cisco's legacy code within 24 months, with a two person team. Fortune reported it on October 30, 2026. No results have been reported yet, the 98 percent figure is a target. The structure of the bet, not the number, is what enterprise engineering leaders should actually study.

Oct 19, 2026 AI Engineering

ChatGPT Atlas vs Perplexity Comet: Which AI Browser Actually Works for Enterprise Workflows

Two AI native browsers now compete for the same enterprise seat: OpenAI's ChatGPT Atlas, which launched on Mac in October 2025 with an agent mode gated to paid plans, and Perplexity's Comet, which added a dedicated Enterprise Pro tier with SOC 2 Type II certification, admin permissioning, and MDM rollout to thousands of devices in March 2026. Both sit on Chromium and both will click through a web page on your behalf. What actually differs is who can turn the agent loose, what IT can see once they do, and whether a security team would sign off on either one today.

Ready when you are

Want to discuss this topic?

Start a Conversation