Skip to content

Back to the catalog

FOSSA: Mini-Shai-Hulud Mass Compromise
fossa.comwriteup

FOSSA: Mini-Shai-Hulud Mass Compromise

FOSSA's technical breakdown of the May 2026 Mini-Shai-Hulud campaign, which compromised at least 235 npm and PyPI packages including @tanstack/*, @uipath/*, mistralai, and @opensearch-project/opensearch. It details the two install-time payload mechanisms (a Git-dependency prepare-hook trick with an orphan commit for @tanstack/*, and direct preinstall scripts for @uipath/*/Mistral AI), a staged PyPI dropper in __init__.py that evades sandbox scanning, the credential-harvesting targets (AWS/GCP/Azure, Kubernetes, Vault, GitHub, npm tokens), exfiltration infrastructure (filev2.getsession.org, git-tanstack.com), and IDE-persistence via modified Claude/VS Code config files.

TL;DR Breakdown of the Mini-Shai-Hulud supply-chain worm that hit 235 npm/PyPI packages (@tanstack, @uipath, mistralai, OpenSearch) via lifecycle-hook and staged-dropper payloads that steal cloud/CI credentials and persist via IDE config poisoning.
Document

What it is

FOSSA's remediation writeup on the Mini-Shai-Hulud supply-chain attack of May 11, 2026, which pushed malicious versions of at least 235 npm/PyPI packages. It started with 42 @tanstack/* packages, then spread to UiPath (65 pkgs), Mistral AI, OpenSearch, Guardrails AI, plus ~62 unscoped typosquats. FOSSA ties it to the earlier SAP CAP compromise (late April 2026) as a prior Shai-Hulud variant.

How it works

Two npm delivery paths and one PyPI path all fire at install/import time, before review or sandboxing:

flowchart TD
  A[npm install / import] --> B{delivery path}
  B -->|tanstack| C[optionalDependencies -> Git pkg<br/>prepare hook runs, exits non-zero]
  B -->|uipath/mistral| D[preinstall: node setup.mjs<br/>downloads Bun runtime]
  B -->|PyPI import| E[__init__.py dropper -> curl<br/>83.142.209.194 -> /tmp/transformers.pyz]
  C --> P[secondary payload]
  D --> P
  E --> P
  P --> X[harvest creds -> Session -> filev2.getsession.org]
  P --> Y[IDE poisoning persists past reinstall]

The prepare-hook variant deliberately exits non-zero so logs read as an inert optional-dependency failure. The PyPI dropper is staged: the sdist/wheel contain only the dropper (confirmed in mistralai 2.4.6), so static analysis sees the fetch but not the payload; sandboxes that install-but-don't-import miss it entirely. Transitive imports trigger it too.

Preconditions / Affected

  • Any npm install (even a pinned single version) of an affected npm package.
  • Any import mistralai or import guardrails — including transitive imports — on PyPI.
  • Affected PyPI: mistralai, guardrails-ai, numpy-fast. Affected npm scopes include @tanstack/*, @uipath/*, @mistralai/*, @squawk/*, @tallyui/*, @opensearch-project/opensearch, plus ~62 unscoped typosquats.
  • Credentials at risk: AWS (~/.aws/credentials, EC2 metadata), GCP/Azure, Kubernetes SA tokens, Vault (~/.vault-token), GitHub tokens (ghp_*/gho_*/ghs_*), GitHub Actions OIDC, GitLab/CircleCI CI tokens, npm tokens (~/.npmrc).

What to do

The page gives no shell commands, but concrete detections/IOCs:

  • Network: block/hunt 83.142.209.194, filev2.getsession[.]org (Session-protocol exfil), and git-tanstack[.]com (secondary C2).
  • Filesystem: check for /tmp/transformers.pyz and the ~2.3MB obfuscated router_init.js inside tarballs.
  • Persistence: inspect and clean ~/.claude/setup.mjs, ~/.claude/router_runtime.js, ~/.vscode/tasks.json, ~/.vscode/setup.mjs — a wipe-and-reinstall of the dependency does not evict these.
  • Rotate every credential class listed above if any affected package was installed/imported.

Caveats

Wiz reported on May 13 that a bug renders the payload non-functional for the @uipath/* and @mistralai/* npm packages specifically — but the PyPI mistralai package is unaffected by the bug and must be treated as fully compromised. Do not let the npm bug create false confidence about the PyPI side.

Organisations named here

  • filev2.getsession[.]org
  • git-tanstack.com
  • Guardrails AI
  • Wiz Research

Technologies named here

  • TanStack npm packages
  • FOSSA
  • StepSecurity
  • @uipath/* npm packages
  • Mistral AI npm packages
  • Socket
  • safedep.io
  • Mistral AI
  • guardrails-ai
  • Wiz
  • numpy-fast
  • test4iqserv
  • @opensearch-project/opensearch
  • @squawk/* npm packages
  • @tallyui/* npm packages
  • Smaller-scope npm packages
  • Unscoped npm typosquats
  • npm
  • PyPI
  • tanstack
  • Bun
  • OpenSearch
  • UiPath

Techniques named here

  • Malicious optionalDependencies with Git-hosted package
  • Lifecycle hook abuse
  • Import-triggered dropper
  • Staged payload for sandbox evasion
  • Credential and secret harvesting
  • Exfiltration via messaging protocol
  • IDE poisoning / persistence

Threat actors named here

  • Mini Shai-Hulud
  • Shai-Hulud campaign
  • SAP CAP compromise