A financially motivated threat cluster known as TeamPCP has been attributed to a widespread supply chain campaign dubbed "Mini Shai-Hulud." This campaign recently achieved a significant victory by compromising the popular open-source library TanStack, a suite of widely used tools for building web applications. The attack, which also impacted the npm and PyPI package ecosystems, relies on typosquatting and dependency confusion to trick developers into downloading malicious packages. Once installed, these packages execute a payload designed to steal credentials and other sensitive information from the developer's environment. The breach of a foundational library like TanStack poses a severe risk to the software supply chain, potentially affecting thousands of downstream applications and organizations.
TeamPCP is a threat group focused on compromising developer environments to steal valuable secrets, such as API keys, private code, and cryptocurrency wallets. Their "Mini Shai-Hulud" campaign employs several common supply chain attack techniques.
postinstall scripts in package.json) that execute automatically upon download. This script typically downloads and runs a second-stage payload, which is the credential stealer.The attack chain is typical of modern package manager-based supply chain attacks:
postinstall script defined in the malicious package's configuration file..env, .aws/credentials), SSH keys, and browser data, then exfiltrates the findings to the attacker's C2 server.T1195.001 - Compromise Software Dependencies and Development Tools: The attack centers on poisoning packages in public software repositories.T1078 - Valid Accounts: To compromise a major package like TanStack, the attackers likely needed to compromise a legitimate maintainer's account.T1059 - Command and Scripting Interpreter: The use of postinstall scripts to execute malicious commands.T1555 - Credentials from Password Stores: The payload is designed to steal credentials from various sources on the developer's machine.T1041 - Exfiltration Over C2 Channel: Stolen data is sent back to the attacker.The compromise of a foundational framework like TanStack has a cascading effect across the software industry.
No specific package names, versions, or C2 domains were mentioned in the source articles.
npm audit, Snyk, Dependabot) to check for known malicious packages. Monitor network logs from developer machines and build servers for suspicious outbound connections, especially from package manager processes. Analyze package-lock.json or yarn.lock files to see exactly which package versions are being used and from where they were resolved.node_modules).postinstall script executed.package-lock.json, yarn.lock, poetry.lock). This ensures that builds are reproducible and that only specific, vetted versions of dependencies are installed, preventing a malicious update from being pulled in automatically.npm install --ignore-scripts) in environments where it's not strictly necessary. This provides a crucial layer of protection against malicious postinstall hooks.Prevent the automatic execution of installation scripts from package managers (e.g., using `--ignore-scripts`).
Use automated dependency scanning tools to audit projects for malicious or vulnerable packages.
Apply strict egress filtering on build servers to prevent malicious scripts from connecting to attacker C2 servers.
Run build processes in isolated, ephemeral environments to limit the potential impact of a compromised dependency.
While traditionally for binaries, the principle of Executable Allowlisting can be adapted to CI/CD pipelines to defend against attacks like the one on TanStack. Instead of allowing npm or pip to execute any arbitrary postinstall script, the build environment should be hardened to prevent it. A practical implementation is to run package manager commands with flags that disable script execution by default (e.g., npm install --ignore-scripts). If a specific package legitimately requires a post-install script, it can be explicitly allowed after a thorough security review. This 'default-deny' posture for script execution directly blocks the primary attack vector used by TeamPCP, preventing the malicious payload from ever running, even if a compromised package is downloaded.
Dynamic Analysis in a sandbox is a powerful technique for vetting new or updated dependencies before they are introduced into a production build environment. Before a developer commits an update to a dependency like TanStack, the new version should be automatically installed in an isolated, instrumented sandbox. This sandbox would monitor for suspicious activities during installation, such as: 1) Network connections to unknown or non-repository domains. 2) Filesystem access outside the package's directory. 3) Execution of unexpected processes. If the sandbox detects the malicious postinstall script attempting to contact a C2 server, it would flag the package as malicious and block the dependency update. This automated vetting process acts as a crucial quality gate, preventing poisoned packages from entering the software supply chain.
System File Analysis, in the form of dependency scanning, is a fundamental defense. Organizations must integrate automated tools like Snyk, Dependabot, or npm audit directly into their CI/CD pipelines. These tools maintain databases of known malicious packages and vulnerabilities. When a developer attempts to add or update a dependency, the scanner checks the package name and version against this database. In the case of the TanStack compromise, once the malicious version was identified and added to these databases, any subsequent build attempting to use it would fail with a security warning. This provides a rapid, ecosystem-wide response to known threats. It's a critical, albeit reactive, control that helps contain the spread of a publicly disclosed supply chain attack.
A coordinated supply chain attack linked to the 'Mini Shai-Hulud' campaign compromises the npm and PyPI ecosystems, including the TanStack library.
The attack campaign is publicly attributed to the threat group TeamPCP.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.