2026年5月10日、攻撃者はzblgg(GitHub ID 127806521)というアカウントでTanStack/routerをフォークし、フォーク一覧の検索に表示されないよう、意図的にzblgg/configurationという名前を付けました。悪意あるコミット(65bf499d)は、Anthropic Claude GitHub Appになりすました偽のID claude <claude@users.noreply.github.com>で作成され、プッシュ時の自動CIを抑止するため[skip ci]が付けられていました。
5月11日10:49、攻撃者はTanStack/router#mainに対してPR #7378を作成しました。タイトルは「WIP: simplify history build」です。これにより、既知の設定ミスが悪用されました。TanStackのbundle-size.ymlワークフローはpull_request_targetトリガーを使いながら、フォークのマージ参照をチェックアウトし、フォーク側が制御するコードを実行していました。
GitHub 独自の GraphQL API を利用したデッドドロップコミット経由の二次的なデータ持ち出しも行われます。作成者はclaude@users.noreply.github.com(Anthropic Claude GitHub App を偽装)、メッセージはchore: update dependencies。Dependabot 風のブランチ名は Frank Herbert の『デューン』シリーズから取られており、dependabout/…/setup-formatter です(「dependabot」ではなく「dependabout」です)。GitHub の GraphQL エンドポイントは、ほぼすべての CI ネットワークの外向き通信ポリシーで許可リストに登録されているため、この経路は境界防御を完全に迂回します。
1<project>/.claude/router_runtime.js # payload self-copy2<project>/.claude/settings.json # hooks config: runs on every tool event3<project>/.claude/setup.mjs # ESM loader shim
Claude Code のhooks 設定では、ファイル編集や bash の実行などのツールイベントに応じてシェルコマンドを実行できます。ワームは自身を.claude/settings.json に書き込むことで、影響を受けたプロジェクトディレクトリで開発者が Claude Code を使うたびに再実行されます。
VS Code(.vscode/):
1<project>/.vscode/setup.mjs # ESM loader shim2<project>/.vscode/tasks.json # runs setup.mjs on folder open
VS Code のワークスペースタスクの自動実行機能も、独立した実行経路になります。この2つの仕組みにより、影響を受けたバージョンでnpm install を実行した開発者は、エディターを開くたびに環境を再侵害されるおそれがあります。
Nx npm マルウェアの解説:AI エージェントの乗っ取り — サプライチェーンマルウェアが VS Code タスクと AI コーディングエージェントのフックを永続化の経路として悪用する手口を、同一の手法が使われた Nx npm ワームキャンペーンの分析とともに解説します。
1# Vulnerable: trusts the entire repository2Trusted publisher: Repository: tanstack/router
安全な設定:
1# Secure: pins to specific branch and workflow2Trusted publisher:3 Repository: tanstack/router4 Workflow: .github/workflows/release.yml5 Branch: refs/heads/main
1# Safe inspection: downloads tarball without executing lifecycle scripts2npm pack @tanstack/react-router@1.169.5 --dry-run34# Or manually unpack and inspect5npm pack @tanstack/<name>@<version>6tar -xzf *.tgz7grep -A3 optionalDependencies package/package.json8ls -la package/router_init.js # present = compromised version
1# Check by hash2find . -name "router_init.js" -exec shasum -a 256 {} \;3# Compromised hash: ab4fcadaec49c03278063dd269ea5eef82d24f2124a8e15d7b90f2fa8601266c
1# Check for the malicious optionalDependency marker in installed packages2find node_modules/@tanstack -name "package.json" | \3 xargs grep -l "voicproducoes\|79ac49eedf"
ステップ1:認証情報をローテーションする前に永続化を封じ込める
侵害の証拠が見つかった場合は、何よりも先にデッドマンスイッチを無効にしてください:
1# Linux — stop and disable the monitoring service2systemctl --user stop gh-token-monitor.service 2>/dev/null3systemctl --user disable gh-token-monitor.service 2>/dev/null4rm -f ~/.config/systemd/user/gh-token-monitor.service5rm -f ~/.local/bin/gh-token-monitor.sh67# macOS — unload the LaunchAgent8launchctl unload ~/Library/LaunchAgents/com.user.gh-token-monitor.plist 2>/dev/null9rm -f ~/Library/LaunchAgents/com.user.gh-token-monitor.plist
次に、エディターの永続化フックを削除します:
1# Claude Code hooks2cat ~/.claude/settings.json 2>/dev/null | grep -i "router_runtime\|setup.mjs"3cat .claude/settings.json 2>/dev/null | grep -i "router_runtime\|setup.mjs"4# Remove router_runtime.js, setup.mjs, and any suspicious hook entries56# VS Code tasks7cat .vscode/tasks.json 2>/dev/null8# Remove any task referencing setup.mjs or router_runtime.js910# Check for injected GitHub Actions workflow11ls .github/workflows/codeql_analysis.yml 2>/dev/null12# If present and you didn't add it, it's likely the injected exfil workflow — remove it
1# Check for dead-drop commits authored as the Claude bot2git log --all --author=claude@users.noreply.github.com3# Revert any unexpected commits and force-push after confirming they're not legitimate
1# Update your npm trusted publisher config to include:2workflow: .github/workflows/release.yml3branch: refs/heads/main4# (not just repository: owner/repo)