Tuesday, 17 November 2026

Tensorlake npm attack delivers worm that steals dev credentials

One poisoned Tensorlake SDK release raided developer secrets, copied itself into other packages and armed a wiper that fires if you revoke the stolen GitHub token.

Laptop and node_modules box on desk suggesting compromised npm package

The short version

  • A malicious release of the tensorlake npm package, a TypeScript SDK, carried a self-spreading worm from the ChainDrop and Shai-Hulud family.
  • The worm grabs npm, GitHub, cloud, Kubernetes, Vault and SSH secrets, plus config files for AI coding tools like Claude Code and Cursor.
  • A hidden monitor checks the stolen GitHub token and can wipe the home folder if the victim revokes it, so cleanup order matters.
  • The bad version is no longer on npm, and anyone who installed it is told to remove it and rotate every credential.
Quick read · 2 min

Attackers hijacked the official tensorlake npm package, a TypeScript toolkit for Tensorlake's cloud services, and shipped a release that installs a self-spreading worm. The malicious files were pushed to the project's GitHub repository under a maintainer's name on October 7, and the automated release process published them to npm a day later.

Once installed, the worm steals GitHub, npm, cloud, Kubernetes, Vault and SSH secrets, plus settings for AI coding tools. It republishes infected copies of any package the victim can publish and plants files that relaunch it inside Claude Code and VS Code.

  • The bad version has been pulled from npm.
  • A hidden monitor can wipe your home folder if the stolen GitHub token is revoked.
  • Affected developers should isolate machines, remove the package and rotate every credential.

It is the latest strike in the ChainDrop campaign, which first hit more than 400 npm packages in August.

A single bad update to a developer toolkit was enough. The Tensorlake npm attack slipped a worm into the official tensorlake package that steals passwords and keys, copies itself into other software, and can erase your home folder if you try to cut it off the wrong way.

If you write code, this is the kind of attack that turns one install into a company-wide problem. Whatever secrets the infected machine can see (cloud keys, GitHub logins, publishing tokens) are now in someone else’s hands, and the worm can keep working after the package itself is gone. If you don’t write code, it still matters: the apps you use are built from thousands of packages like this one, and poisoned ones can reach your data through the back door.

01

What happened in the Tensorlake npm attack

The tensorlake package is a TypeScript software development kit (SDK), a ready-made set of code that developers use to connect their projects to Tensorlake’s applications, sandboxes and cloud services. It is published on npm, the giant public library of JavaScript code that most web projects pull from automatically.

Security firm StepSecurity found that the attacker pushed malicious files straight into the main branch of the tensorlakeai/tensorlake GitHub repository under a real maintainer’s name. The first rogue commit landed early on October 7, 2026. A day later, the project’s own automated release process published the poisoned build to npm, so it looked like a normal, trusted update.

The infected release sits in the 0.5 line of the SDK (build one forty-four). It is no longer available to download from npm, but anyone who pulled it in during that window should assume their machine and pipelines were exposed.

Hands unplugging drive and note saying rotate credentials
02

How the worm gets in and spreads

The trick starts the moment you install. The package includes a preinstall hook, a script npm runs automatically before installation finishes, which launches a file called setup.mjs. That file starts a scrambled loader, which then runs the main payload, Math_Symbol.js, using Bun, a fast alternative JavaScript runtime.

Security company Socket, which analyzed the release, says the code harvests credentials, sends secrets out, sets itself up to survive reboots, and runs fresh code that the attackers send it later. It also drops HackBrowserData, a tool that pulls saved data out of web browsers.

Then it tries to multiply. Socket explains that the worm looks up every package the victim is allowed to publish, generates Sigstore provenance (a digital stamp meant to prove where a package came from) and pushes infected versions of those packages. That is what makes it a worm rather than a one-off theft: every developer it hits becomes a new launch point. Strings in the code also point to a fake Copilot or Dependabot workflow, which suggests it plants GitHub Actions automation in repositories too.

StepSecurity’s Ashish Kurmi flagged one more hook. The malware writes a .claude/settings.json file and a .vscode/tasks.json file into any repository it can reach, so the payload starts again whenever someone opens that project in Claude Code or VS Code.

03

What the stolen-data list includes

The shopping list is long. The worm goes after:

  • GitHub and npm tokens, which let attackers push code as you
  • Amazon Web Services keys and secrets, plus HashiCorp Vault data and Kubernetes credentials
  • SSH keys and .env files, where many projects keep passwords in plain text
  • Cryptocurrency wallets and messaging app data
  • Configuration and MCP files for AI coding tools, including Cursor, Zed, Windsurf, Kiro and Anthropic’s Claude

To get the haul out, it first tries the attackers’ own server. If that fails, it reads an Ethereum smart contract to find a new server address, which is hard for defenders to take down. As a last resort it stashes encrypted loot in a public GitHub repository carrying the description “Shai-Hulud: Here We Go Again.”

Home office with checklist to remove package and rotate keys
04

The wiper trap that punishes a quick fix

Here is the nasty part. The malware installs what researchers call a “hostage token” monitor: a PowerShell script that keeps checking GitHub’s account endpoint with the stolen token to see if it still works.

If the victim revokes that token, the monitor runs an attacker-supplied command through PowerShell’s Invoke-Expression feature, and that code is built to wipe the user’s home directory. Earlier Shai-Hulud waves used the same move. So the natural first reaction, killing the GitHub token, can destroy your files if the monitor is still running.

05

Where this fits in the ChainDrop campaign

Tensorlake is the latest victim of a long-running operation. ChainDrop was first reported in early August 2026, when Microsoft Threat Intelligence disclosed on August 4 that more than 400 npm packages, including the popular Keyv and Cacheable libraries, carried a Mini Shai-Hulud worm delivered through the same kind of scrambled Bun payload. That wave was also built to tamper with Claude Code and VS Code settings files.

The pattern is clear: attackers have moved from stealing a single API key to targeting the AI agent tooling that developers now run every day. Configuration files for coding assistants are attractive because the assistant trusts them and loads them before any human looks.

06

What developers should do now

If you installed the poisoned tensorlake release, or anything that depends on it, treat the machine and any CI runners that touched it as compromised. A sensible order of work:

  1. Disconnect or isolate the affected machine and look for the PowerShell monitor and any persistence before revoking tokens, so the wiper can’t fire.
  2. Remove the bad package, pin tensorlake to a clean version, and clear npm caches.
  3. Rotate everything the machine could reach: npm and GitHub tokens, cloud keys, Vault and Kubernetes credentials, SSH keys and secrets in .env files.
  4. Check your repositories for new .claude/settings.json, .vscode/tasks.json or GitHub Actions workflow files you didn’t add.
  5. Review packages you publish for unexpected new versions released under your name.

Longer term, turn off automatic install scripts where you can, give tokens the narrowest permissions possible, and require two-person review for changes to release workflows.

07

Quick answers

Is the bad tensorlake version still on npm?

No. The malicious release can no longer be downloaded from the npm registry, but copies may still sit in lockfiles, caches and build images.

Is this the same as the Shai-Hulud worm?

It is part of the same family. Researchers tie it to the ChainDrop and Mini Shai-Hulud campaigns that first hit hundreds of npm packages in August 2026.

Should I revoke my GitHub token right away?

Only after you have found and stopped the hostage-token monitor, because revoking first can trigger code that wipes your home folder.

You're reading the quick version.