1004: TanHacked

Summary of 1004: TanHacked

by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

23mMay 13, 2026

Overview of 1004: TanHacked

Wes Bos and Scott Tolinski break down a major JavaScript/Python supply-chain attack centered on the Shai-Hulud worm (a Dune reference), which compromised popular packages in the npm ecosystem and spread further through automated publishing. The episode explains how the attack worked, why it was especially dangerous, what kinds of packages were affected, and practical steps developers can take to reduce their risk.

What Happened

The short version

  • Multiple popular packages, including TanStack, were compromised.
  • Malicious updates were published to npm and designed to:
    • run automatically after installation,
    • harvest credentials and tokens,
    • and help the worm propagate to other packages.

Why this was notable

  • This was not a simple “developer password got stolen” incident.
  • The attack abused GitHub Actions cache poisoning, especially around pull_request_target workflows.
  • The result was a self-propagating worm that could spread through the ecosystem.

How the Attack Worked

GitHub Actions cache poisoning

  • The attackers exploited shared caches in GitHub Actions.
  • They poisoned the pnpm store cache inside a workflow tied to pull requests.
  • When a legitimate release workflow later ran, it pulled from the poisoned cache and executed the malicious code.

Token theft and publishing takeover

  • The malicious workflow attempted to fail in a way that exposed an OIDC token.
  • That token was then used to obtain a valid npm publish token.
  • Once the attackers had publishing access, they could push compromised packages directly to npm.

Self-propagation

  • After gaining access, the worm:
    • published malicious versions of packages,
    • tried to insert itself into other auto-run locations,
    • and spread to additional packages in the ecosystem.

Impact and Behavior

Packages and ecosystems hit

  • The episode mentions impacts across:
    • TanStack
    • UIPath packages
    • Mistral
    • CMUX Agent MCP
    • and broader npm / PyPI-adjacent ecosystems

What the malware tried to do

  • Harvest credentials from the machine, including cloud-related secrets like AWS credentials.
  • Install itself into places that run automatically, such as:
    • .clod settings JSON
    • VS Code tasks.json
  • Use a dead-man switch:
    • If a victim revoked their GitHub token, the malware could trigger destructive behavior, including rm -rf on the home directory.

How to Protect Yourself

For maintainers

  • Avoid risky GitHub Actions patterns, especially pull_request_target unless you fully understand the security implications.
  • Review workflows for cache poisoning and trust-boundary issues.
  • Consider security review tooling, including:
    • Sentry security review AI skills
    • Snyk Labs GitHub Actions scanner
    • Step Security
    • Socket package scanning

For package consumers

  • Prefer package managers and settings that add friction for suspicious installs:
    • pnpm by default enforces a minimum release age and prompts before scripts run.
    • Enable similar protections in Yarn, npm, and Bun where available.
  • Use:
    • minimum release age / package age gates
    • script approval
    • block exotic subdependencies where supported
  • Consider using Socket CLI or similar tools in front of installs.
  • Use dev containers to sandbox potentially dangerous code.
  • Be careful with AI-assisted tooling that runs commands automatically.

Key Takeaways

  • Supply-chain attacks are now a routine threat, not an edge case.
  • The most dangerous part is often not the initial package, but the automation around it.
  • Default-on protections matter:
    • pnpm was highlighted as doing a better job than npm in this area.
  • The ecosystem needs stronger defenses from package registries and build tooling.
  • Developers should assume that any install command may execute hostile code and add guardrails accordingly.

Notable Insights

  • The hosts repeatedly emphasize that this attack did not require stealing a maintainer’s password.
  • A shared CI cache was enough to compromise a release pipeline.
  • They argue that package registries like npm need stronger built-in defenses, since third-party scanning tools are effectively doing the job the registry should be doing.
  • They also note that AI-based security tools may become increasingly important for catching malicious behavior before it runs.

Practical Action Items

  • Audit your GitHub Actions workflows for pull_request_target.
  • Turn on install-time protections in your package manager.
  • Use containerized development environments for untrusted code.
  • Add dependency scanning and CI security checks to your workflow.
  • Assume your dependencies can be compromised and plan for containment accordingly.