# keyv-cacheable-npm-worm-writes-auto-run-hooks-into-claude-settings-json: keyv/cacheable npm Worm Writes Auto-Run Hooks Into .claude/settings.json

> keyv/cacheable npm Worm Writes Auto-Run Hooks Into .claude/settings.json is a critical-severity supply chain compromise issue in keyv and cacheable namespace releases published during the campaign, an AI agent. Affected: keyv and cacheable namespace releases published during the campaign, plus 400+ downstream packages. It has been exploited in the wild.

- **Canonical URL:** https://catalog.anomity.ai/vuln/keyv-cacheable-npm-worm-writes-auto-run-hooks-into-claude-settings-json
- **Aliases:** ti-065
- **Severity:** critical
- **Attack type:** Supply chain compromise, Credential theft, Malware
- **Component:** keyv and cacheable namespace releases published during the campaign (AI agent)
- **Exploited in the wild:** yes
- **Published:** 2026-08-04
- **Last verified:** 2026-11-01
- **JSON:** https://catalog.anomity.ai/api/entries/vuln/keyv-cacheable-npm-worm-writes-auto-run-hooks-into-claude-settings-json

## Summary

A self-propagating worm in the Shai-Hulud family compromised the keyv and cacheable npm namespaces and spread to more than 400 packages. Beyond harvesting AI tool credentials, the payload writes its own entries into the developer's .claude/settings.json as a SessionStart hook and into .vscode/tasks.json as a folderOpen task, so it re-executes the next time Claude Code starts or the folder is opened, surviving removal of the package that delivered it. Analyzed independently by Socket, Wiz, Aikido, JFrog and SafeDep.

## Affected versions

| Affected | Fixed in |
| --- | --- |
| keyv and cacheable namespace releases published during the campaign, plus 400+ downstream packages | no fixed version listed |

## Am I affected by this vulnerability?

You are affected if you run keyv and cacheable namespace releases published during the campaign, plus 400+ downstream packages.

## How do I fix it?

Audit .claude/settings.json and .vscode/tasks.json on every developer machine for hook and task entries nobody added, and treat any unexpected entry as active compromise rather than drift. Rotate AI tool credentials, npm tokens and cloud keys from affected machines. Removing the npm package alone does not remove persistence.

## How do I find every machine running keyv and cacheable namespace releases published during the campaign?

Anomity inventories the AI agents, MCP servers, IDE extensions and skills on each developer device, so you can see which machines run keyv and cacheable namespace releases published during the campaign and which version, then enforce a policy on it.

## References

- article: https://socket.dev/blog/popular-npm-packages-in-the-keyv-and-cacheable-namespaces-compromised-in-active-supply-chain

## Related vulnerabilities

- [mandiant-hijacked-ai-coding-assistant-session-deploys-shai-hulud-across](https://catalog.anomity.ai/vuln/mandiant-hijacked-ai-coding-assistant-session-deploys-shai-hulud-across) — critical
- [asyncapi-npm-packages-backdoored-with-miasma-malware-framework](https://catalog.anomity.ai/vuln/asyncapi-npm-packages-backdoored-with-miasma-malware-framework) — critical
- [mini-shai-hulud-170-npm-pypi-packages-compromised-in-coordinated](https://catalog.anomity.ai/vuln/mini-shai-hulud-170-npm-pypi-packages-compromised-in-coordinated) — critical
- [self-propagating-npm-supply-chain-worm-targets-ai-agent-packages](https://catalog.anomity.ai/vuln/self-propagating-npm-supply-chain-worm-targets-ai-agent-packages) — critical
- [litellm-1-107-0-compromised-on-pypi-and-docker-a-cook-pth-startup-hook](https://catalog.anomity.ai/vuln/litellm-1-107-0-compromised-on-pypi-and-docker-a-cook-pth-startup-hook) — critical
- [symantec-the-aoki-infostealer-now-takes-claude-codex-cursor-copilot](https://catalog.anomity.ai/vuln/symantec-the-aoki-infostealer-now-takes-claude-codex-cursor-copilot) — high

---

Source: Anomity Security Database (https://catalog.anomity.ai/vuln). Detect affected AI tools on developer devices: https://anomity.ai/?utm_source=catalog&utm_medium=vuln-md&utm_campaign=keyv-cacheable-npm-worm-writes-auto-run-hooks-into-claude-settings-json
