Tensorlake Supply-Chain Attack Comes with Booby Trap

Last Updated: 2026-10-08T17:04:34Z

What’s Happening

A mini-shai-hulud variant has impacted the tensorlake npm package, version 0.5.144. The usual research labs have writeups on this incident.

https://socket.dev/blog/tensorlake-compromise

https://www.aikido.dev/blog/tensorlake-npm-package-compromised

https://www.stepsecurity.io/blog/tensorlake-npm-compromised-hostage-token-worm

https://safedep.io/tensorlake-npm-compromise-mini-shai-hulud/

As of this writing, the infected version has been removed from GitHub, although the commits (e90c47b to 6386121) are still visible.

A Novel TTP

The observed TTPs are familiar, save one. Yes the malware comes from a preinstall hook (which should be disabled by now). Yes, it steals creds and worms to other repositories. But this variant also contains a “dead man’s switch.” Per Step Security:

When the malware has a GitHub token, it installs a small service called gh-token-monitor. Every 60 seconds, for up to 24 hours, the service checks that token against the GitHub API. If GitHub rejects it, the service runs rm -rf ~/ (or a PowerShell delete of your user profile on Windows). So the obvious first move, revoking the token, is what sets it off.

So, remediation must be done carefully. Pay attention.

Actions

This is from Step, and the order matters.

  1. Check if you have it. Run npm ls tensorlake and look in your lockfiles for 0.5.144. Also check whether you cloned or pulled tensorlakeai/tensorlake main since October 7 and ran npm install in typescript/.
  2. Pin it. Install tensorlake@0.5.143, delete node_modules, and run npm cache clean --force. Setting ignore-scripts=true in .npmrc stops install hooks like this one.
  3. Remove the token monitor. Back up anything you can’t lose first. If 0.5.144 was ever installed on your machine, look for the folder ~/.config/gh-token-monitor/. If it’s there, open the token file inside to see which GitHub token it holds, then stop the service.

On Windows, be sure to remove the Scheduled Task that launches monitor.ps1.

Observables

Value Type Description
25a0735d0db7dc40e5d45ce42d9c106067e6a66e184d967cfecfab17c3bcb5ef SHA256 lib/setup.mjs preinstall hook
b50a00900399ba99fb6ce1fc151519cb99d44320ef2a631f2237e1aea0ad6fec SHA256 lib/Math_Symbol.js worm
iseekaigogo[.]com Domain C2 Domain
0x779f83aE56309682beDb04816c19d358c4B21040 Ethereum wallet
~/.config/gh-token-monitor/ Path Persistence directory for dead man’s switch
~/.local/bin/gh-token-monitor.sh Path Dead man’s switch path on Linux/macOS
gh-token-monitor Scheduled Task Token monitor on Windows
%LOCALAPPDATA%\gh-token-monitor\monitor.ps1 Path PowerShell script run by dead man’s switch on Windows.

Notes

Some reporting only mentions the PowerShell version of the token monitor, but it is indeed cross-platform.

The malware has a hard-coded C2 domain, but also employs etherhiding to resolve alternatives via an Ethereum wallet. The RPC nodes used are listed in IFIN Lists and should be blocked with extreme prejudice.

Turns out a previous variant also had a dead man’s switch.