keyv 6.0.0, cacheable 2.5.1, cacheable-request 13.0.20, flat-cache 6.1.24 and file-entry-cache 11.1.7 on npm ran hidden code that gathered keys on 4 August 2026.
Aikido calls this a Shai-Hulud style worm. It also spread to hundreds of other packages.
What happened
Attackers took over a maintainer account and published poisoned versions to npm.
- Each package added
setup.mjs,Math_Symbol.jsand apreinstallhook that runsnode setup.mjs. - The script downloads a Bun runtime from GitHub and runs an obfuscated second stage.
- The second stage steals cloud, Vault, Kubernetes, GitHub Actions OIDC and npm tokens, plus
.envfiles, SSH keys, Terraform state and Docker configs. - The worm adds the same hook to packages the victim can publish and republishes them with stolen npm tokens.
- It writes persistence into
.claude/settings.jsonand.vscode/tasks.json.
Socket reports keyv 6.0.0 at 09:35 UTC on 4 August 2026 and the cacheable packages between 10:09 and 10:14 UTC. Aikido counts more than 440 packages and 1,381 versions in the secondary spread.
Affected versions
keyv@6.0.0cacheable@2.5.1cacheable-request@13.0.20flat-cache@6.1.24file-entry-cache@11.1.7(Socket). Aikido lists 11.1.6, so check both.@cacheable/memory@2.2.1,@cacheable/utils@2.5.1,@cacheable/net@2.1.1,@cacheable/node-cache@3.1.2cache-manager@7.2.10- Scoped
@keyv/*packages such as@keyv/redis,@keyv/sqliteand@keyv/mongo - The full list is longer. Wiz publishes it in its IOC repository.
Indicators of compromise
- Files:
setup.mjsandMath_Symbol.jsormath_init.jsinsidenode_modules. - Hook in
package.json:"preinstall": "node setup.mjs". - SHA-256 of
setup.mjs:54dc7ea54a1317cca0e890a2770630cf7fa6c97813e0cb9d2caa93012b350668. - SHA-256 of the community-spread
setup.mjs:fd3ca4007b225fdf8de7af4345a19179d5efa8c4bb9205f88cda806e5684b1eb. - SHA-256 of
Math_Symbol.js:9fc2570b7cef51c1b8df116d144d11ff4096357be7d2c4c6367cfc2509cf1bcc. - Temporary folders
/tmp/bun-dl-*/. - Persistence:
~/.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. - Unexpected hooks in
~/.claude/settings.jsonand.vscode/tasks.json. - Network:
npm-cache[.]comandeth-mainnet.nodereal[.]io, plus the user agentBun/1.3.13. - GitHub: public repositories with the description "Shai-Hulud: Here We Go Again", and commits by
claudewith the message "chore: update config".
How to check
List the bad versions in your projects. The command does not run any package.
npm ls keyv cacheable cacheable-request flat-cache file-entry-cache cache-manager
Look for the dropped files.
find . -path "*/node_modules/*" \( -name Math_Symbol.js -o -name math_init.js \) 2>/dev/null; ls -d /tmp/bun-dl-* 2>/dev/null
What to do now
- Remove the poisoned versions from developer machines, build agents and CI. Pin to the version before the bad one.
- If a bad version was installed, treat the machine as compromised. Remove the persistence files and the
bun-dl-*folders first. Socket warns that a dead-man trigger watches your GitHub token. - Then revoke and replace npm, GitHub, cloud, Vault and Kubernetes tokens.
- Check your npm account for versions you did not publish on 4 August 2026. Check your GitHub account for new repositories.
What Vigilance would show
These examples show an install hold and the corresponding owner report.
Example install message
Vigilance blocked `keyv` 6.0.0. This version is too new or changed in a way Vigilance must check first.
Example owner report
Bad update
keyv 6.0.0
Installing the library now ran hidden code first that gathered cloud and login keys and re-published poisoned copies of other libraries.
No security team? See who reads the alert.
Frequently asked questions
Which keyv versions are clean?
The 5.x releases and 6.0.0-rc.1 were clean.
Which malware family is this?
Wiz says it belongs to the "Mini" Shai-Hulud family.
Did the bad releases carry valid signatures?
Yes. Aikido reports the attacker pushed files to the main branch, so the releases carried valid GitHub Actions signatures.
Sources
Send this page to the person who looks after AI at your company.