Tuesday, 12 May 2026
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • DMCA
logo logo
  • World
  • Politics
  • Crime
  • Economy
  • Tech & Science
  • Sports
  • Entertainment
  • More
    • Education
    • Celebrities
    • Culture and Arts
    • Environment
    • Health and Wellness
    • Lifestyle
  • đŸ”„
  • Trump
  • House
  • ScienceAlert
  • White
  • VIDEO
  • man
  • Trumps
  • Season
  • star
  • Years
Font ResizerAa
American FocusAmerican Focus
Search
  • World
  • Politics
  • Crime
  • Economy
  • Tech & Science
  • Sports
  • Entertainment
  • More
    • Education
    • Celebrities
    • Culture and Arts
    • Environment
    • Health and Wellness
    • Lifestyle
Follow US
© 2024 americanfocus.online – All Rights Reserved.
American Focus > Blog > Tech and Science > Protect your enterprise now from the Shai-Hulud worm and npm vulnerability in 6 actionable steps
Tech and Science

Protect your enterprise now from the Shai-Hulud worm and npm vulnerability in 6 actionable steps

Last updated: May 12, 2026 3:36 pm
Share
Protect your enterprise now from the Shai-Hulud worm and npm vulnerability in 6 actionable steps
SHARE

Contents
Three vulnerabilities combined into one provenance-attested wormThe worm spread from npm to PyPI within hoursThe attacker considered AI coding agents as part of the trusted execution environmentCI/CD Trust-Chain Audit GridSecurity director action planThe worm is evolving. Defenders must adapt, too

Any development environment that installed or imported one of the 172 compromised npm or PyPI packages released since May 11 should be considered potentially compromised. On affected developer workstations, the worm extracts credentials from over 100 file paths, including AWS keys, SSH private keys, npm tokens, GitHub PATs, HashiCorp Vault tokens, Kubernetes service accounts, Docker configurations, shell history, and cryptocurrency wallets. For the first time in a TeamPCP campaign, it also targets password managers such as 1Password and Bitwarden, according to SecurityWeek.

The worm also captures Claude and Kiro AI agent configurations, including MCP server authentication tokens for all external services an agent connects with. It does not leave even when the package is removed.

The worm establishes persistence in Claude Code (.claude/settings.json) and VS Code (.vscode/tasks.json with runOn: folderOpen) to re-execute whenever a project is opened, alongside a system daemon (macOS LaunchAgent / Linux systemd) that endures reboots. These reside in the project tree, not in node_modules, and removing the package does not eliminate them. On CI runners, the worm directly reads runner process memory via /proc/pid/mem to retrieve secrets, including masked ones, on Linux-based runners. If tokens are revoked before isolating the machine, Wiz’s analysis reveals a destructive daemon erases your home directory.

Between 19:20 and 19:26 UTC on May 11, the Mini Shai-Hulud worm released 84 malicious versions across 42 @tanstack/* npm packages. Within 48 hours, the campaign grew to 172 packages spanning 403 malicious versions across npm and PyPI, as tracked by Mend. @tanstack/react-router alone sees 12.7 million weekly downloads. CVE-2026-45321, CVSS 9.6. OX Security reported that 518 million cumulative downloads were affected. All malicious versions had a valid SLSA Build Level 3 provenance attestation. The provenance was legitimate, but the packages were tampered with.

“TanStack had the right setup on paper: OIDC trusted publishing, signed provenance, 2FA on every maintainer account. The attack worked anyway,” Peyton Kennedy, a senior security researcher at Endor Labs, explained to VentureBeat in an exclusive interview. “What the orphaned commit technique shows is that OIDC scope is the actual control that matters here, not provenance, not 2FA. If your publish pipeline trusts the entire repository rather than a specific workflow on a specific branch, a commit with no parent history and no branch association is enough to get a valid publish token. That’s a one-line configuration fix.”

Three vulnerabilities combined into one provenance-attested worm

TanStack’s postmortem describes the attack chain. On May 10, the attacker forked TanStack/router under the name zblgg/configuration, a name chosen to avoid fork-list searches according to Snyk’s analysis. A pull request triggered a pull_request_target workflow that checked out fork code and ran a build, allowing the attacker code execution on TanStack’s runner. The attacker then poisoned the GitHub Actions cache. When a legitimate maintainer merged to main, the release workflow restored the poisoned cache. Attacker binaries accessed /proc/pid/mem, extracted the OIDC token, and sent it directly to registry.npmjs.org. Tests failed, but 84 signed packages still reached the registry.

“Each vulnerability bridges the trust boundary the others assumed,” the postmortem states. Techniques from the March 2025 tj-actions/changed-files compromise were reused in a new context.

See also  JUNO Neutrino Observatory Releases First Results

The worm spread from npm to PyPI within hours

Microsoft Threat Intelligence verified that the mistralai PyPI package v2.4.6 executes on import, not on installation, downloading a payload disguised as Hugging Face Transformers. npm mitigations (lockfile enforcement, –ignore-scripts) do not account for Python import-time execution.

Mistral AI released a security advisory detailing the impact. Compromised npm packages were available between May 11 at 22:45 UTC and May 12 at 01:53 UTC, approximately three hours. The PyPI release mistralai==2.4.6 is quarantined. Mistral confirmed an affected developer device was involved, but no Mistral infrastructure was compromised. SafeDep verified Mistral never released v2.4.6; no commits occurred on May 11, and no tag exists.

Wiz chronicled the full blast radius: 65 UiPath packages, Mistral AI SDKs, OpenSearch, Guardrails AI, and 20 Squawk packages. StepSecurity attributes the campaign to TeamPCP, citing toolchain similarities with previous Shai-Hulud waves and the Bitwarden CLI/Trivy compromises. The worm operates under Bun instead of Node.js to avoid Node.js security monitoring.

The attacker considered AI coding agents as part of the trusted execution environment

Socket’s technical analysis of the 2.3 MB router_init.js payload identifies ten credential-collection classes running in parallel. The worm installs persistence into .claude/ and .vscode/ directories, hooking into Claude Code’s SessionStart configuration and VS Code’s folder-open task runner. StepSecurity’s deobfuscation confirmed the worm also collects Claude and Kiro MCP server configurations (~/.claude.json, ~/.claude/mcp.json, ~/.kiro/settings/mcp.json), which store API keys and authentication tokens for external services. This marks an early but confirmed case of supply-chain malware targeting AI agent configurations as valuable credential targets. The npm token description set by the worm reads: “IfYouRevokeThisTokenItWillWipeTheComputerOfTheOwner.” This is not an idle threat.

“What stood out to me about this payload is where it planted itself after running,” Kennedy told VentureBeat. “It wrote persistence hooks into Claude Code’s SessionStart config and VS Code’s folder-open task runner, ensuring it would re-execute every time a developer opened a project, even after the npm package was removed. The attacker treated the AI coding agent as part of the trusted execution environment, which it is. These tools read your repo, run shell commands, and have access to the same secrets a developer does. Securing a development environment now means thinking about the agents, not just the packages.”

CI/CD Trust-Chain Audit Grid

Six gaps the Mini Shai-Hulud exploited. What your CI/CD does today. The control that closes each one.

Audit question

What your CI/CD does today

The gap

1. Pin OIDC trusted publishing to a specific workflow file on a specific protected branch. Constrain id-token: write to only the publish job. Ensure that job runs from a clean workspace with no restored untrusted cache

Most organizations grant OIDC trust at the repository level. Any workflow run in the repo can request a publish token. id-token: write is often set at the workflow level, not scoped to the publish job.

The worm achieved code execution inside the legitimate release workflow through cache poisoning, then extracted the OIDC token from runner process memory. Branch/workflow pinning alone would not have stopped this attack because the malicious code was already running inside the pinned workflow. The complete fix requires pinning PLUS constraining id-token: write to only the publish job PLUS ensuring that job uses a clean, unshared cache.

2. Treat SLSA provenance as necessary but not sufficient. Add behavioral analysis at install time

Teams treat a valid Sigstore provenance badge as proof a package is safe. npm audit signatures passes. The badge is green. Procurement and compliance workflows accept provenance as a gate.

All 84 malicious TanStack versions carry valid SLSA Build Level 3 provenance attestations. First widely reported npm worm with validly-attested packages. Provenance attests where a package was built, not whether the build was authorized. Socket’s AI scanner flagged all 84 artifacts within six minutes of publication. Provenance flagged zero.

3. Isolate GitHub Actions cache per trust boundary. Invalidate caches after suspicious PRs. Never check out and execute fork code in pull_request_target workflows

Fork-triggered workflows and release workflows share the same cache namespace. Closing or reverting a malicious PR is treated as restoring clean state. pull_request_target is widely used for benchmarking and bundle-size analysis with fork PR checkout.

Attacker poisoned pnpm store via fork-triggered pull_request_target that checked out and executed fork code on the base runner. Cache survived PR closure. The next legitimate release workflow restored the poisoned cache on merge. actions/cache@v5 uses a runner-internal token for cache saves, not the workflow’s GITHUB_TOKEN, so permissions: contents: read does not prevent mutation. Kennedy: ‘Branch protection rules don’t apply to commits that aren’t on any branch, so that whole layer of hardening didn’t help.’

4. Audit optionalDependencies in lockfiles and dependency graphs. Block github: refs pointing to non-release commits

Static analysis and lockfile enforcement focus on dependencies and devDependencies. optionalDependencies with github: commit refs are not flagged by most tools.

The worm injected optionalDependencies pointing to a github: orphan commit in the attacker’s fork. When npm resolves a github: dependency, it clones the referenced commit and runs lifecycle hooks (including prepare) automatically. The payload executed before the main package’s own install step completed. SafeDep confirmed Mistral never released v2.4.6; no commits landed and no tag exists.

5. Audit Python dependency imports separately from npm controls. Cover AI/ML pipelines consuming guardrails-ai, mistralai, or any compromised PyPI package

npm mitigations (lockfile enforcement, –ignore-scripts) are applied to the JavaScript stack. Python packages are assumed safe if pip install completes. AI/ML CI pipelines are treated as internal testing infrastructure, not as supply-chain attack targets.

Microsoft Threat Intelligence confirmed mistralai PyPI v2.4.6 executes on import, not install. Injected code in __init__.py downloads a payload disguised as Hugging Face Transformers. –ignore-scripts is irrelevant for Python import-time execution. guardrails-ai@0.10.1 also executes on import. Any agentic repo with GitHub Actions id-token: write is exposed to the same OIDC extraction technique. LLM API keys, vector DB credentials, and external service tokens all in the blast radius.

6. Isolate and image affected machines before revoking stolen tokens. Do not revoke npm tokens until the host is forensically preserved

Standard incident response: revoke compromised tokens first, then investigate. npm token list and immediate revocation is the instinctive first step.

The worm installs a persistent daemon (macOS LaunchAgent / Linux systemd) that polls GitHub every 60 seconds. On detecting token revocation (40X error), it triggers rm -rf ~/, wiping the home directory. The npm token description reads: ‘IfYouRevokeThisTokenItWillWipeTheComputerOfTheOwner.’ Microsoft reported geofenced destructive behavior: a 1-in-6 chance of rm -rf / on systems appearing to be in Israel or Iran. Kennedy: ‘Even after the package is gone, the payload may still be sitting in .claude/ with a SessionStart hook pointing at it. rm -rf node_modules doesn’t remove it.’

See also  New Nintendo Switch 2 Release Date, Specs, Rumours & Wishlist

Sources: TanStack postmortem, StepSecurity, Socket, Snyk, Wiz, Microsoft Threat Intelligence, Mend, Endor Labs. May 12, 2026.

Security director action plan

  • Today: “The fastest check is find . -name ‘router_init.js’ -size +1M and grep -r ’79ac49eedf774dd4b0cfa308722bc463cfe5885c’ package-lock.json,” Kennedy said. If either returns a hit, isolate and image the machine immediately. Do not revoke tokens until the host is forensically preserved. The worm’s destructive daemon triggers on revocation. Once the machine is isolated, rotate credentials in this order: npm tokens first, then GitHub PATs, then cloud keys. Hunt for .claude/settings.json and .vscode/tasks.json persistence artifacts across every project that was open on the affected machine.

  • This week: Rotate every credential accessible from affected hosts: npm tokens, GitHub PATs, AWS keys, Vault tokens, K8s service accounts, SSH keys. Check your packages for unexpected versions after May 11 with commits by claude@users.noreply.github.com. Block filev2.getsession[.]org and git-tanstack[.]com.

  • This month: Audit every GitHub Actions workflow against the six gaps above. Pin OIDC publishing to specific workflows on protected branches. Isolate cache keys per trust boundary. Set npm config set min-release-age=7d. For AI/ML teams: check guardrails-ai and mistralai against compromised versions, audit CI pipelines for id-token: write exposure, and rotate every LLM API key and vector DB credential accessible from CI.

  • This quarter (board-level): Fund behavioral analysis at the package registry layer. Provenance verification alone is no longer a sufficient procurement criterion for supply-chain security tooling. Require CI/CD security audits as part of vendor risk assessments for any tool with publish access to your registries. Establish a policy that no workflow with id-token: write runs from a shared cache. Treat AI coding agent configurations (.claude/, .kiro/, .vscode/) as credential stores subject to the same access controls as cloud key vaults.

See also  Google Pixel 10 Colours Leak: Midnight, Limoncello & More

The worm is evolving. Defenders must adapt, too

This marks the fifth Shai-Hulud wave in eight months. Four SAP packages escalated to 84 TanStack packages in two weeks. intercom-client@7.0.4 succumbed 29 hours later, confirming active spread through stolen CI/CD infrastructure. Late on May 12, malware research group vx-underground reported that the fully weaponized Shai-Hulud worm code has been open-sourced. If verified, this means the attack is no longer confined to TeamPCP. Any threat actor can now use the same cache-poisoning, OIDC-extraction, and provenance-attested publishing chain against any npm or PyPI package with a vulnerable CI/CD setup.

“We’ve been monitoring this campaign family since September 2025,” Kennedy said. “Each wave has targeted a higher-download package and introduced a more technically intriguing access vector. The orphaned commit technique here is genuinely novel. Branch protection rules don’t apply to commits not associated with any branch. The supply chain security space has focused heavily on provenance and trusted publishing over the last two years. This attack bypassed both controls because the gap wasn’t in signing. It was in scope.”

Provenance indicates where a package was built. It does not confirm whether the build was authorized. This audit aims to address that gap.

TAGGED:ActionableEnterprisenpmProtectShaiHuludStepsVulnerabilityWorm
Share This Article
Twitter Email Copy Link Print
Previous Article Rescuers told to hold off saving man, dogs in river Rescuers told to hold off saving man, dogs in river
Next Article Study examines why males, more prone to suicide, seek help less Study examines why males, more prone to suicide, seek help less

Popular Posts

League of Legends LoLdle answers 1237 (Tuesday, November 25, 2025)

The latest edition of LoLdle answers for November 25, 2025, has been released, featuring five…

November 24, 2025

Bonanno wiseguy convicted of threatening turncoat, forcing him to strip naked over $150K debt

John Ragano, a member of the Bonanno crime family, was found guilty of extortion by…

October 11, 2024

True Rippers’ Hydro becomes MVP of CEGC 2025 BGMI Grand Finals

BGMI star Hydro from True Rippers has once again showcased his incredible skills in the…

November 16, 2025

10 Celebrity Event Outfits of the Week & How to Recreate Them

Cinch your waist with a bold leather belt to add definition and structure to the…

March 23, 2025

Mental Health And Addiction Recovery: Managing Anxiety And Depression

Recovery from addiction is a challenging journey that often involves rebuilding one's life from the…

November 21, 2024

You Might Also Like

Math reveals the one game of chance you should always accept
Tech and Science

Math reveals the one game of chance you should always accept

May 12, 2026
Google Pixel Glow Designs Shown by Gemini
Tech and Science

Google Pixel Glow Designs Shown by Gemini

May 12, 2026
A new tectonic plate boundary could be forming in southern Africa
Tech and Science

A new tectonic plate boundary could be forming in southern Africa

May 12, 2026
Ridgewood’s Thriving Art Scene Steps Out of Bushwick’s Shadow
Culture and Arts

Ridgewood’s Thriving Art Scene Steps Out of Bushwick’s Shadow

May 12, 2026
logo logo
Facebook Twitter Youtube

About US


Explore global affairs, political insights, and linguistic origins. Stay informed with our comprehensive coverage of world news, politics, and Lifestyle.

Top Categories
  • Crime
  • Environment
  • Sports
  • Tech and Science
Usefull Links
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • DMCA

© 2024 americanfocus.online –  All Rights Reserved.

Welcome Back!

Sign in to your account

Lost your password?