tensorlake npm Malware Wipes Home If Token Revoked

The Shai-Hulud worm in tensorlake@0.5.144 plants a hostage-token monitor that deletes your home directory if you revoke the stolen GitHub token.

@sharedot

tensorlake npm Malware Wipes Home If Token Revoked

By @sharedot · · 8 pages

  • Programming
  • Supply Chain Security
  • Npm
  • Shai Hulud
  • Malware

The Shai-Hulud worm in tensorlake@0.5.144 plants a hostage-token monitor that deletes your home directory if you revoke the stolen GitHub token.

A poisoned release straight from the trusted pipeline

On October 8, 2026, npm published tensorlake@0.5.144 carrying a Shai-Hulud worm payload.

According to StepSecurity, the first malicious commit landed on the main branch of tensorlakeai/tensorlake at 01:20 UTC on October 7 under a maintainer's name, with seven more commits following and none going through a pull request.

A day later the repo's own release workflow published the package to npm — which is why it carries a valid provenance attestation. Provenance confirms where a build came from, not that the source was clean.

The hostage token: revocation triggers rm -rf ~/

The cruelest trick in this wave is the booby trap. The malware installs a small service called gh-token-monitor that polls the stolen GitHub token against the GitHub API every 60 seconds for up to 24 hours, StepSecurity reports.

If GitHub rejects the token — meaning the victim did the obvious, responsible thing and revoked it — the service runs rm -rf ~/ on Linux or macOS, or a PowerShell delete of the user profile on Windows.

OX Security notes the kill-switch string 'IfYouRevokeThisTokenItWillWipeTheComputerOfTheOwner' matches one used in the May TanStack attack. The safe order is: remove the monitor first, then rotate credentials.

What it steals and how it spreads

Once installed, the preinstall hook runs setup.mjs (it skips CI machines, targeting developer workstations), downloads the Bun runtime and executes an obfuscated 856 KB payload.

The steal list is broad: npm and GitHub tokens, AWS/GCP/Azure cloud keys, Kubernetes and HashiCorp Vault secrets, SSH keys, saved browser logins, crypto wallets, and config files for AI tools like Claude, Cursor and Windsurf.

It spreads by republishing itself into every npm package the victim can publish to — Socket reports it even builds Sigstore provenance for those versions — and by committing .claude/settings.json and .vscode/tasks.json files into reachable repos, so it re-runs when someone opens the project in Claude Code or VS Code.

Shai-Hulud becomes a brand, not a group

OX Security reports the attackers used newly seen public encryption keys not connected to any earlier Shai-Hulud variant, suggesting an independent actor or new group reusing the name. The original TeamPCP members were arrested in August, but the name now works as a copycat brand.

Command and control resolves through an Ethereum smart contract pointing to iseekaigogo.com, with encrypted stolen data staged in public GitHub repos described as "Shai-Hulud: Here We Go Again" — five such repositories were observed uploading stolen credentials.

OX Security also found an Ethereum contract address tied to a wallet holding just $12.44, created 16 days before the attack.

Remediation: pin 0.5.143, remove the monitor, then rotate

The order of operations matters. StepSecurity advises running npm ls tensorlake and checking lockfiles for 0.5.144, then pinning tensorlake@0.5.143, deleting node_modules and cleaning the npm cache.

Before rotating anything, look for ~/.config/gh-token-monitor/ on the machine; if present, back up what you can, stop the systemd user service or LaunchAgent (or the Windows Task Scheduler task), and delete it — only then revoke the GitHub token.

Endor Labs confirms 0.5.143 and earlier contain no preinstall hook or payload, and notes version 0.5.144 has since been removed from the npm registry, though the six tensorlake-native-* platform binaries from the same run should also be avoided.

Setting ignore-scripts=true in .npmrc blocks install hooks of this kind going forward.

Why provenance-trusting pipelines were blindsided

The uncomfortable lesson for developers and platform teams: the release came from the project's real repository, through its normal GitHub Actions workflow, with a valid attestation — exactly the signals most policies treat as trustworthy.

Endor Labs argues the most likely root cause is a compromised maintainer account, the signature behavior of Shai-Hulud. Socket's analysis, per news.lavx.hu, adds that the worm plants persistence that can retain attacker access even after the malicious dependency is removed.

Expect renewed pressure for version-cooldown checks and script-blocking installs, plus cleanup work that goes beyond npm: auditing repos for unexpected .claude and .vscode files and reviewing GitHub Actions workflows for jobs nobody added.

Sources

  1. stepsecurity.io › Tensorlake npm Package Compromised: A Worm With a Hostage Token That Wipes Your Machine If You Revoke It
  2. ox.security › "Shai-Hulud: Here We Go Again" - "tensorlake" npm Package Hit With Malware
  3. news.lavx.hu › Hackers poison tensorlake npm package to spread Shai-Hulud credential-stealing worm
  4. endorlabs.com › Tensorlake npm package compromised by Shai-Hulud in latest software supply chain attack

More on Programming