TeamPCP-Attributed Shai-Hulud Campaign Uses Stolen OIDC Tokens to Publish Malicious Packages

· Original article ↗

Summary

A Shai-Hulud campaign attributed to TeamPCP used stolen OIDC tokens and CI/CD credentials to publish malicious packages across npm, PyPI and Composer, stealing developer secrets and establishing persistence.

Key points

  • Security vendors reported hundreds of compromised package artifacts across npm, PyPI and Composer, with counts varying by source.
  • A TanStack post-mortem says attackers chained a risky GitHub Actions workflow, cache poisoning and OIDC token theft; 84 malicious versions across 42 TanStack packages carried valid provenance and signatures.
  • Attackers reportedly used an orphaned Git commit accessible through GitHub’s shared fork storage and a malicious optional dependency to trigger code during package installation.
  • The malware targeted developer secrets including GitHub, npm, AWS, Kubernetes, Vault and SSH credentials; researchers said it also read GitHub Actions process memory.
  • The malware reportedly used the Session P2P network to exfiltrate information and created Claude Code hooks and VS Code auto-run tasks for persistence.
  • Researchers advised checking affected package versions and developer machines, rotating exposed credentials, auditing IDE directories and adding behavioral checks at install time.

Article Details

Attack Vectors
  • The attackers reportedly chained a risky pull_request_target workflow, GitHub Actions cache poisoning, and theft of OIDC tokens from runner memory to publish malicious packages through legitimate CI/CD pipelines.
  • A malicious optional dependency referenced an orphaned commit in a TanStack/router fork, causing npm to fetch and execute attacker-controlled code during package installation.
  • The malware collected developer credentials, including GitHub and npm tokens, cloud credentials, Kubernetes tokens, Vault tokens, SSH keys, and .env files, then exfiltrated data through the Session P2P network.
  • For self-propagation, the malware used stolen GitHub/npm credentials to enumerate packages associated with compromised maintainers, modify package tarballs, and republish malicious versions.
  • After infection, the malware reportedly persisted through Claude Code hooks and VS Code auto-run tasks.
Defensive Notes
  • Check for affected package versions and persistence on developer machines; audit IDE directories for malicious files such as router_runtime.js or setup.mjs.
  • Assume credentials were exposed after downloading an affected package, and rotate GitHub, npm, AWS, Vault, Kubernetes service-account, and CI/CD credentials.
  • Block the reported command-and-control infrastructure at DNS or proxy level.
  • Verify package provenance and add behavioral analysis at install time, alongside signature-based checks for malicious packages.
  • Consider enforcing lockfile-only installs to prevent automatic or silent package updates.

Indicators of compromise

TypeIndicatorContext
DOMAINapi[.]masscan[.]cloudListed as threat-actor command-and-control infrastructure to block.
DOMAINgit-tanstack[.]comListed as threat-actor command-and-control infrastructure to block.

MITRE ATT&CK

Threat Actors

Products

Related Articles