Supply chain · August 4, 2026

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

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.

DisclosedAugust 4, 2026
Earliest known activityAugust 4, 2026
Affectedkeyv, flat-cache, file-entry-cache, cache-manager, cacheable-request, npm, GitHub Actions
TypeSupply chain
StatusContained

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.

Am I 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 now

  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

Guides to the credentials this incident put at risk:

Timeline

  1. 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
  2. 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
  3. 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
  4. 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

Indicators

From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.

  • 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.

What this changes for credential handling

  • The payload read CI secrets straight out of runner memory, so masking and per-step env scoping did not help. BotPassword hands a CI step a short-lived credential for one action instead of placing long-lived secrets in the job.
  • The worm planted an agent SessionStart hook, so opening a repository in a coding agent became an infection path.

Frequently asked questions

Am I affected by the keyv incident?

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 was exposed in the keyv incident?

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.

Which keys should I rotate?

Rotate any GitHub, npm, AWS (IAM access keys), Google Cloud (service account keys and API keys), Azure (Microsoft Entra app client secrets), Stripe, HCP Terraform (Terraform Cloud) credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.

Keep keys out of reach of the next compromised package

BotPassword is in early access. Request an invite and we'll email you when your spot opens.