Attackers published 84 malicious versions across 42 @tanstack npm packages, each with a new hidden file that collected build secrets, on 11 May 2026.
Each bad version carried a hidden file named router_init.js that ran at install time and stole build secrets. The same campaign, Mini Shai-Hulud, also hit packages from Mistral AI, UiPath, OpenSearch and Guardrails AI.
What happened
An attacker used three chained flaws in the TanStack GitHub Actions setup to publish poisoned packages straight to npm.
- The attacker opened a pull request from the fork
zblgg/configuration. Apull_request_targetworkflow ran its build code with no approval gate. - That code wrote a poisoned 1.1 GB pnpm store entry into the shared GitHub Actions cache. A workflow on the main branch restored it.
- Malicious binaries read the runner memory, took the OIDC token and posted it to
registry.npmjs.org. - Each bad tarball gained
router_init.jsand a newoptionalDependenciesentry that pulled a payload from the attacker's fork. - The payload sent out AWS, GCP, Kubernetes, Vault, npm, GitHub and SSH credentials. It installed a
gh-token-monitordaemon that runsrm -rf ~/when the stolen token is revoked.
The first 42 packages went live at 19:20 UTC on 11 May 2026. TanStack deprecated all 84 versions by 21:03 UTC.
Affected versions
- Two versions of each of 42 packages in the @tanstack scope, 84 in total. TanStack lists them in advisory GHSA-g7cv-rxg3-hmpx.
@tanstack/react-router,@tanstack/vue-router,@tanstack/solid-routerand@tanstack/router-core: 1.169.5 and 1.169.8.@tanstack/react-start: 1.167.68 and 1.167.71.@tanstack/router-plugin: 1.167.38 and 1.167.41.@tanstack/history: 1.161.9 and 1.161.12.- Not affected: query, table, form, virtual, store and the
@tanstack/startmeta-package. - Wiz counts more than 120 npm packages across several namespaces, plus the PyPI packages
guardrails-ai0.10.1 andmistralai2.4.6.
Indicators of compromise
- File
router_init.jsin the package root, SHA-256ab4fcadaec49c03278063dd269ea5eef82d24f2124a8e15d7b90f2fa8601266c. - File
tanstack_runner.js, SHA-2562ec78d556d696e208927cc503d48e4b5eb56b31abc2870c2ed2e98d6be27fc96. - Dependency
"@tanstack/setup": "github:tanstack/router#79ac49eedf774dd4b0cfa308722bc463cfe5885c"inoptionalDependencies. - Domains
filev2.getsession.org,seed1.getsession.org,seed2.getsession.org,seed3.getsession.organdgit-tanstack.com. - Download URLs
litter.catbox.moe/h8nc9u.jsandlitter.catbox.moe/7rrc6l.mjs. - Persistence files
.claude/router_runtime.js,.claude/settings.json,.claude/setup.mjs,.vscode/setup.mjsand.vscode/tasks.json. - Daemon
gh-token-monitor:~/.local/bin/gh-token-monitor.shand a systemd user service on Linux, or~/Library/LaunchAgents/com.user.gh-token-monitor.pliston macOS. - Git commits authored as
claude@users.noreply.github.com. - Advisory GHSA-g7cv-rxg3-hmpx and CVE-2026-45321.
How to check
Search the project folder for the payload file and the git dependency. The commands only read files.
find . -name router_init.js -exec shasum -a 256 {} +
grep -rl "79ac49eedf774dd4b0cfa308722bc463cfe5885c" node_modules package-lock.json pnpm-lock.yamlCheck for the persistence files and the daemon.
ls .claude/router_runtime.js .claude/setup.mjs .vscode/setup.mjs ~/.local/bin/gh-token-monitor.sh ~/Library/LaunchAgents/com.user.gh-token-monitor.plist
What to do now
- Stop the
gh-token-monitordaemon and remove its files before you revoke any token. - Remove the
.claudeand.vscodepersistence files and revert any malicious commits. - Rotate GitHub, npm, AWS, GCP, Vault, Kubernetes and SSH credentials that the machine or runner can read.
- Pin to a clean version. Block
*.getsession.organdgit-tanstack.comat the DNS or proxy level.
What Vigilance would show
These examples show an install hold and the corresponding owner report.
Example install message
Vigilance blocked `@tanstack/`. This version is too new or changed in a way Vigilance must check first.
Example owner report
Bad update
@tanstack/
The package gained a new hidden file that ran during install, collected build secrets and sent them away.
No security team? See who reads the alert.
Frequently asked questions
Is it safe to install TanStack now?
TanStack states that every currently published version of every TanStack package is safe. The 84 malicious versions were deprecated and later removed from npm.
How can I lower the risk of this kind of attack?
Pin GitHub Actions to commit SHAs and restrict OIDC trusted publishing to a named workflow and branch. Snyk also suggests a package manager release-age delay of 7 days.
Sources
Send this page to the person who looks after AI at your company.