
CVE-2026-45321(TanStack 공급망 손상) 및 Mini Shai-Hulud 웜 아티팩트를 탐지합니다. node_modules, lockfiles, 지속성 후크(Claude Code, VS Code, systemd, LaunchAgent), GitHub 워크플로우, git 히스토리, C2 도메인 및 AI 도구 구성을 스캔합니다.
⚠️ 면책 조항: 이 도구는 제 개인적인 사용 사례를 위해 제작되었습니다. 모든 지표는 다음 권고 출처에서 파생되었습니다:
이 문서가 마지막으로 업데이트된 이후 새로운 IOC, 페이로드 변종 또는 공격자 인프라가 등장하면 감지되지 않습니다. 항상 최신 게시된 권고와 교차 확인하십시오.
TanStack 공급망 손상(CVE-2026-45321) 및 관련 Mini Shai-Hulud 웜 아티팩트를 로컬 프로젝트 체크아웃에서 감지합니다.
이 스크립트는 소스 체크아웃, CI 작업 및 Docker 빌드에서 빠른 분류를 위해 설계되었습니다. 깨끗한 결과는 아래 알려진 지표 중 어느 것도 발견되지 않았음을 의미합니다. 이는 완전한 포렌식 조사나 시스템이 노출된 적이 없다는 보장이 아닙니다.
| 범주 | 세부 사항 |
|---|---|
| 손상된 패키지 | 42개의 모든 @tanstack/* 패키지 + 20개의 웜 전파 2차 피해 패키지(@mistralai, @opensearch-project, @draftlab, safe-action 등) |
| Lockfile 검사 | pnpm-lock.yaml, yarn.lock, bun.lock, bun.lockb, package-lock.json, 다중 행 npm v3 packages 항목 및 Yarn v1 selector/version 스탠자 포함 |
| 페이로드 파일 | node_modules 내 router_init.js, tanstack_runner.js와 SHA-256 검증; 해시 일치와 불일치 모두 검사 실패 |
| 감염 경로 | 설치된 패키지에서 optionalDependency로 @tanstack/setup |
| 지속성 | 프로젝트 및 홈 설정 모두의 Claude Code SessionStart 훅, VS Code folderOpen 작업, gh-token-monitor (LaunchAgent + systemd), 악성 GitHub 워크플로우 |
| 디스크 아티팩트 | .claude/router_runtime.js, .claude/setup.mjs, .vscode/setup.mjs, gh-token-monitor.sh, com.user.gh-token-monitor.plist |
| 소스 IOC | 공격자 커밋 해시, C2 도메인(api.masscan.cloud, git-tanstack.com), Session Protocol 엔드포인트, PBKDF2 솔트, 캠페인 문자열 |
| Git 기록 | [email protected]가 작성한 커밋 |
| 브랜치 패턴 | dependabot/github_actions/format/* 및 dependabout/*/setup-formatter |
| AI 도구 설정 | 변조된 .claude/mcp.json 및 .kiro/settings/mcp.json |
| 실행 중인 프로세스 | 데몬화된 페이로드 및 gh-token-monitor 프로세스 |
| npm 토큰 | 랜섬 표시된 토큰(IfYouRevokeThisTokenItWillWipeTheComputerOfTheOwner) |
pnpm, yarn, bun, npm)로 프로젝트 lockfile 하나를 선택합니다. 저장소에 여러 lockfile이 의도적으로 있는 경우 각 관련 패키지 관리자 상태를 별도로 검사하세요.npm을 사용할 수 있고 npm token list 실행에 충분한 인증이 있는 경우에만 실행됩니다.HOME을 검사합니다. CI 또는 컨테이너에서는 개발자 워크스테이션의 홈 디렉터리와 다를 수 있습니다.# 현재 디렉터리 스캔
bash check-tanstack-compromise.sh .
# 특정 프로젝트 스캔
bash check-tanstack-compromise.sh /path/to/project
# 한 줄 명령 (curl)
curl -sL https://raw.githubusercontent.com/ry-allan/tanstack-compromise-checker/main/check-tanstack-compromise.sh | bash
종료 코드 0 = 발견된 해당 지표 없음.
종료 코드 1 = 해당 손상 또는 의심스러운 페이로드 지표 발견됨.
═══════════════════════════════════════════════════════════════
TanStack Supply Chain Compromise Check (CVE-2026-45321)
═══════════════════════════════════════════════════════════════
Advisory: GHSA-g7cv-rxg3-hmpx
Reference: https://snyk.io/blog/tanstack-npm-packages-compromised/
Deep dive: https://www.stepsecurity.io/blog/mini-shai-hulud-is-back-…
[*] Scanning: /Users/xxxxx/repos/xxxxx
[*] Package manager: pnpm (pnpm-lock.yaml)
[*] Checking installed TanStack packages against 42 known-compromised versions…
[*] Checking worm-propagated secondary victims (Mini Shai-Hulud)…
[*] Packages: @mistralai, @opensearch-project, @draftlab, @draftauth,
[*] @dirigible-ai, safe-action, cmux-agent-mcp, nextmove-mcp,
[*] git-git-git, git-branch-selector, agentwork-cli, ml-toolkit-ts,
[*] wot-api, cross-stitch, ts-dna
[*] Scanning lockfile for known-compromised versions (pnpm-lock.yaml)…
[✓] No compromised versions in lockfile
[*] Checking for persistence artifacts (payload files, hooks, services, C2)…
[✓] No malicious author commits in git history
───────────────────────────────────────────────────────────────
[✓] No compromise detected.
Aikido Safe Chain을 설치하여 모든 패키지 설치 시 악성 코드를 자동으로 스캔하세요:
curl -fsSL https://github.com/AikidoSec/safe-chain/releases/latest/download/install-safe-chain.sh | sh
이후 터미널을 다시 시작하세요. Safe Chain은 npm, npx, yarn, pnpm, pip, uv 등을 래핑하여 48시간 미만의 패키지 및 알려진 나쁜 버전이 디스크에 닿기 전에 차단합니다. 토큰이나 구성이 필요하지 않습니다.
통합 Dockerfile은 가상의 픽스처만 생성합니다. 실제 손상된 패키지를 다운로드하지 않습니다.
주요 픽스처는 패키지 매니페스트, lockfile, 지속성 아티팩트, 워크플로우, git 기록, 소스 IOC, 페이로드 파일 이름, AI 도구 설정 및 수정 출력에서 33개의 모든 감지 메시지가 발생하는지 확인합니다:
docker build -f integration.Dockerfile -t tanstack-check-test .
Docker 빌드에는 다음에 대한 대상 회귀 테스트 커버리지도 포함됩니다:
package-lock.json v3 항목에서 패키지 이름과 손상된 버전이 별도 줄에 있는 경우.version이 별도 줄에 있는 경우.router_init.js 페이로드 파일 이름이 종료 코드 1을 반환하는 경우..claude/settings.json이 있어도 홈 수준 Claude Code SessionStart 훅.빌드 후, 이미지 명령을 직접 실행할 수 있습니다:
docker run --rm tanstack-check-test