# keyv, flat-cache and cache-manager npm releases carried a CI-secret stealer with a revocation trap

Source: https://botpassword.com/incidents/2026-08-keyv-cacheable-npm-worm
Disclosed: 2026-08-04 · Type: Supply chain · Status: Contained · Updated: 2026-10-25

On 4 August 2026 malicious releases of ten packages from the `jaredwray/keyv` and `jaredwray/cacheable` repositories, including keyv 6.0.0, flat-cache 6.1.24 and file-entry-cache 11.1.6, were published through GitHub Actions trusted publishing and installed a credential stealer that targeted CI secrets. The worm spread to many more packages; Singapore's Cyber Security Agency counts over 1,300 compromised versions. If you installed one, remove the `gh-token-monitor` persistence first, because revoking the stolen GitHub token triggers it, then rotate.

Identifiers: AD-2026-009

## What was exposed

The researcher's analysis in issue #1692 found a `preinstall` hook that ran `setup.mjs`, which fetched the Bun runtime from GitHub and used it to run an encrypted `Math_Symbol.js`. Recovered components include a scraper that reads GitHub Actions secrets from the `Runner.Worker` process memory through `/proc`, a planted workflow named `Run Copilot` that writes `toJSON(secrets)` to a build artifact, and pattern sweeps for AWS keys and instance metadata, Google Cloud service-account JSON, Azure keys and client secrets, Stripe keys, database URLs with passwords, private keys, GitHub and npm tokens, Vault tokens and Kubernetes service-account tokens. It also committed `.claude/settings.json` (a `SessionStart` hook) and `.vscode/tasks.json` (a `folderOpen` task) into the repository, so opening a clone in Claude Code or VS Code ran the payload. CSA lists cloud credentials, GitHub tokens, SSH keys, Kubernetes configs and Terraform credentials for rotation. The worm republished other packages through their own trusted-publishing workflows.

## Who is affected

You are affected if any machine or CI job installed keyv 6.0.0, flat-cache 6.1.24, file-entry-cache 11.1.6, cacheable-request 13.0.20, cacheable 2.5.1, `@cacheable/memory` 2.2.1, cache-manager 7.2.10, `@cacheable/node-cache` 3.1.2, `@cacheable/utils` 2.5.1, `@cacheable/net` 2.1.1 or ecto 5.0.1, or another package on CSA's referenced list, directly or transitively. Run `npm ls` for these names and search lockfiles and CI logs. Also check for `~/.local/bin/gh-token-monitor.sh`, `~/.config/gh-token-monitor/`, a `com.user.gh-token-monitor` LaunchAgent or a `gh-token-monitor` systemd user service, and for any workflow named `Run Copilot` or using `toJSON(secrets)` in repositories you can push to.

## What to do

1. Before revoking anything, remove the `gh-token-monitor` LaunchAgent or systemd user service and its files; the researcher found it runs an attacker-supplied command when the stolen GitHub token stops working.
2. Pin or override to the last clean versions (for example keyv 5.6.0, flat-cache 6.1.23, file-entry-cache 11.1.5, cache-manager 7.2.9).
3. Rotate GitHub tokens and Actions secrets, npm tokens, cloud keys, Stripe keys, database passwords, SSH keys and Kubernetes and Terraform credentials reachable from affected hosts and runners.
4. Delete any `Run Copilot` workflow and any `.claude/settings.json` or `.vscode/tasks.json` you did not write, then rebuild affected machines.
5. Block `npm-cache[.]com`, `pypi-get[.]com` and `js-mirror[.]com` and watch for the indicators CSA publishes.

## Keys to rotate

- [GitHub](https://botpassword.com/keys/github)
- [npm](https://botpassword.com/keys/npm)
- [AWS (IAM access keys)](https://botpassword.com/keys/aws)
- [Google Cloud (service account keys and API keys)](https://botpassword.com/keys/google-cloud)
- [Azure (Microsoft Entra app client secrets)](https://botpassword.com/keys/azure)
- [Stripe](https://botpassword.com/keys/stripe)
- [HCP Terraform (Terraform Cloud)](https://botpassword.com/keys/terraform-cloud)

## Timeline

- 2026-08-04: A commit titled `release: v6.0.0` adding `setup.mjs` and `Math_Symbol.js` lands in jaredwray/keyv at 09:02 UTC; keyv 6.0.0 is published at 09:35 UTC and nine `cacheable` packages follow between 10:09 and 10:14 UTC. ([source](https://github.com/jaredwray/cacheable/issues/1692))
- 2026-08-04: A researcher files issue #1692 with a full analysis after earlier reports were deleted, and later posts corrections to parts of the first analysis. ([source](https://github.com/jaredwray/cacheable/issues/1692))
- 2026-08-05: Maintainer Jared Wray reports remediation: workflows and trusted publishing disabled, machines rebuilt, `main` reset, and npm has removed the malicious `cacheable` releases and restored clean versions as `latest`. ([source](https://github.com/jaredwray/cacheable/issues/1692))
- 2026-08-06: Singapore's Cyber Security Agency publishes advisory AD-2026-009, describing a ChainDrop variant of Shai-Hulud with over 1,300 compromised package versions. ([source](https://www.csa.gov.sg/alerts-and-advisories/advisories/ad-2026-009/))

## Indicators

- Tarball files `package/setup.mjs` and `package/Math_Symbol.js`; `.claude/math_init.js`.
- `~/.local/bin/gh-token-monitor.sh`, `~/.config/gh-token-monitor/`, `~/Library/LaunchAgents/com.user.gh-token-monitor.plist`, `~/.config/systemd/user/gh-token-monitor.service`.
- A workflow named `Run Copilot` exporting `toJSON(secrets)`; exfiltration to `npm-cache[.]com` path `/router`.

## Sources

- https://github.com/jaredwray/cacheable/issues/1692
- https://www.csa.gov.sg/alerts-and-advisories/advisories/ad-2026-009/
