Shai-Hulud worm: how to check if you are affected

Updated 2026-11-15

Short answer: you are affected if a machine or CI job installed one of the compromised npm versions. Check the installed versions first, then look for the files the worm leaves. Do not revoke tokens until its background job is gone: recent variants watch a stolen GitHub token and delete your home directory when that token is revoked.

What Shai-Hulud is

Shai-Hulud is a self-spreading npm worm. It harvests npm tokens, GitHub credentials and cloud secrets from developer machines, then uses stolen npm tokens to publish infected versions of the victim's own packages (ReversingLabs). Its code was published as open source, so new waves keep appearing even after Australian police, working with the FBI, arrested two alleged members of the TeamPCP group (ReversingLabs).

WaveKnown bad versionsSource
4 Aug 2026, keyv / cacheable, more than 400 npm packages (a descendant of "Mini" Shai-Hulud)keyv 6.0.0, cache-manager 7.2.10, cacheable-request 13.0.20, @cacheable/utils 2.5.1 and many moreWiz
8 Oct 2026, tensorlaketensorlake 0.5.144 (0.5.143 is the version to pin)StepSecurity

Wiz keeps the full list of the August wave on its GitHub, linked from its post below.

Step 1: find the package (read-only)

In each project, ask the package manager which versions are installed, including transitive ones:

npm ls keyv cache-manager cacheable-request tensorlake --all
pnpm why keyv
yarn why keyv

Compare every version it prints with the lists above. The lockfile is the record of what was actually installed, so also check lockfiles in projects you have not opened recently.

Step 2: look for the files it leaves

find ~ -path '*/node_modules/keyv/Math_Symbol.js' 2>/dev/null
find ~ \( -path '*/.claude/setup.mjs' -o -path '*/.vscode/setup.mjs' \) 2>/dev/null
ls -la ~/.config/gh-token-monitor 2>/dev/null

These commands only read. They change nothing.

Step 3: the order of cleanup matters

StepSecurity found that the tensorlake payload installs a gh-token-monitor service that checks the stolen GitHub token every 60 seconds for up to 24 hours and runs rm -rf ~/ when GitHub rejects it. Wiz found that in the keyv wave the attacker's server can arm the same kind of switch, which watches whether the token still works at api.github.com/user. So the usual first move, revoking the token, is what triggers the wipe.

  1. Back up what you cannot lose.
  2. Remove the bad package and every service, scheduled task or startup entry it installed.
  3. Only then rotate: GitHub and npm tokens, cloud keys, SSH keys, Kubernetes and Vault credentials, secrets in .env files, AI tool keys and passwords saved in the browser (StepSecurity).
  4. If you cannot be sure the machine is clean, reinstall it (StepSecurity, Wiz).

The tensorlake install hook skips itself on CI, but StepSecurity still advises rotating every secret a CI job that installed it could see.

Does npm audit catch it?

npm audit asks the registry for known vulnerabilities in your dependency tree (npm docs), so a version published minutes ago has no advisory yet. Provenance does not help either: tensorlake 0.5.144 carried a valid npm provenance attestation, which says where a package was built, not that its code is safe (StepSecurity). Setting ignore-scripts=true in .npmrc, the default for dependencies since npm 12, stops install hooks like the one tensorlake used (StepSecurity, ReversingLabs).

Questions

How do I know if I have the Shai-Hulud worm?

Run npm ls for the known bad packages in every project and compare the versions, then look for node_modules/keyv/Math_Symbol.js, setup.mjs in .claude or .vscode folders, ~/.config/gh-token-monitor/, and a GitHub repository described as "Shai-Hulud: Here We Go Again".

Should I revoke my GitHub token right away?

No. Some variants install a monitor that deletes your home directory when the stolen token is revoked. Remove the package and its background jobs first, then rotate the token and other secrets.

Is the worm gone after the TeamPCP arrests?

No. The worm's code is public, and the August 2026 wave hit more than 400 npm packages three weeks before the arrests, according to ReversingLabs.

Sources

Check your own machine

Connect an AI agent to the free, read-only FixLane MCP server or ask the Telegram bot: it checks what you have installed against verified fixed versions and serves a reviewed fix procedure. All guides.