Join our Newsletter — 33% off our NHI Course
Home› NHI Breaches› Tensorlake npm Worm 2026: How a Shai-Hulud Stealer…
Breach analysis Incident: 8 Oct 2026

Tensorlake npm Worm 2026: How a Shai-Hulud Stealer Turned Registry Tokens Into Signed Malicious Releases

PDF for newsletter subscribers · free to read online

← All NHI breaches
By NHI Mgmt Group, edited by Lalit Choda Updated 26 October 2026 11 min read
On this page

On 8 October 2026, security researchers reported that version 0.5.144 of tensorlake, the npm SDK for the Tensorlake AI sandbox platform, had been published with a credential-stealing worm. The malicious code was committed to the project's GitHub repository under a maintainer's name on 7 October and then shipped to npm by the project's own release pipeline, with valid build provenance. A preinstall hook ran the payload on install. It hunts for npm, GitHub and cloud tokens, Vault and Kubernetes credentials, SSH keys, .env files and AI coding tool configs, then uses stolen npm and GitHub access to republish the victim's other packages. Socket and Endor Labs link it to the ChainDrop and Shai-Hulud worm family. How the attacker got commit access has not been disclosed, and Tensorlake has not published a statement in the sources we read. Version 0.5.144 has been removed from npm.

Key takeaways

  • tensorlake 0.5.144 was published to npm at 01:12:07 UTC on 8 October 2026, and Socket says it flagged it about 11 minutes later. Versions 0.5.143 and earlier are not affected, according to Endor Labs.
  • The release came from the project's own GitHub Actions pipeline, so it carried valid provenance. Endor Labs notes that "Provenance confirms where a build came from, not that the source was clean."
  • The payload targets registry, source control and cloud identities: npm and GitHub tokens, AWS, Vault and Kubernetes credentials, plus Claude, Cursor and MCP configuration files.
  • Socket warns of a "hostage token" monitor: revoking the stolen GitHub token while the monitor still runs can trigger a wipe of the user's home directory, so clean-up order matters.
  • The identity lesson: a publishing pipeline trusts whatever lands on the main branch. Whoever can push there holds the registry identity, so commit rights and publish tokens need the same protection.

At a glance

OrganisationsTensorlake (npm package tensorlake, about 12,000 weekly downloads according to Socket) and any developer or CI system that installed version 0.5.144
WhenMalicious commit 7 October 2026; package published and publicly reported 8 October 2026
AttackerUnknown. Researchers link the payload to the ChainDrop and Shai-Hulud worm family by its structure and behaviour
Entry pointA malicious commit pushed to the main branch under a maintainer's name, published to npm by the project's release workflow. How that access was obtained is not known
Identities abusedThe project's publishing pipeline and maintainer identity; on victims, npm and GitHub tokens, AWS, Vault and Kubernetes credentials, SSH keys and AI tool configs
ImpactA signed malicious release of a widely used SDK; credential theft and onward republishing on any host that installed it. No count of victims has been published
CategoryNHI. Incident class: confirmed NHI breach (publishing identity abused to ship a token-stealing worm)

What happened

Tensorlake provides sandboxes for running untrusted, LLM-generated code, and its TypeScript SDK is published to npm as tensorlake. According to Endor Labs, the malicious code first appeared in commit e90c47bbb2 on the main branch of the tensorlakeai/tensorlake repository at 01:20 UTC on 7 October 2026. The Hacker News, citing StepSecurity, reports that the commit was pushed under a maintainer's name. About a day later the repository's release workflow published version 0.5.144. Endor Labs says the build ran through the project's GitHub Actions pipeline and carried valid build provenance.

Socket's research team says the release went live at 01:12:07 UTC on 8 October and that it flagged the package at 01:23:10 UTC. The package manifest gained a preinstall hook running node lib/setup.mjs, so the code runs during npm install even if the SDK is never imported. That loader launches a second file, lib/Math_Symbol.js, under the Bun runtime. Endor Labs describes the payload as about 856 KB. Socket links the file layout to the August 2026 ChainDrop compromises of keyv and cacheable, which also carried a Shai-Hulud variant. Endor Labs adds that six tensorlake-native-* platform packages were published from the same run; it found no payload in them but advises treating them as affected.

The payload is a stealer and a worm. Socket lists npm tokens, GitHub tokens, AWS credentials (including instance metadata, ECS, Secrets Manager and SSM), HashiCorp Vault, Kubernetes service account tokens and kubeconfig files, SSH keys, .env files, crypto wallets, messaging app data and AI developer tool configuration such as .claude, .cursor and MCP files. The Hacker News adds Kiro, Windsurf and Zed configs and says the payload drops the HackBrowserData tool. With stolen credentials, the worm enumerates packages tied to the victim's publishing identity and republishes infected versions with Sigstore provenance. It also plants GitHub Actions workflows dressed up as Copilot or Dependabot, and writes .claude/settings.json and .vscode/tasks.json into reachable repositories so it runs again when the project is opened.

Socket says the malware has no hard-coded command server. It resolves its endpoint through an Ethereum contract via about 30 public RPC endpoints, with GitHub as a fallback, while The Hacker News reports a primary exfiltration domain and a fallback that stages encrypted data in public GitHub repositories titled "Shai-Hulud: Here We Go Again". Socket also describes a PowerShell monitor that persists through a logon scheduled task and checks the stolen GitHub token. If the token is revoked while the monitor runs, it can execute an attacker-supplied handler that wipes the user's home directory. None of the sources we read contain a statement from Tensorlake, and none say how the attacker obtained the access used for the commit. Endor Labs calls a compromised maintainer account "the most likely root cause", which remains unconfirmed.

Timeline

DateEvent
August 2026ChainDrop, a Shai-Hulud style npm worm, compromises keyv, cacheable and hundreds of other packages.
7 October 2026At 01:20 UTC a malicious commit lands on the tensorlake main branch under a maintainer's name.
8 October 2026At 01:12:07 UTC the release workflow publishes tensorlake 0.5.144 to npm with valid provenance.
8 October 2026Socket flags the package at 01:23:10 UTC; Socket, Endor Labs and The Hacker News publish reports the same day.
October 2026Version 0.5.144 is removed from npm. No exact removal time has been published.

How it happened: the identity attack path

  1. Repository write access obtained. The attacker could push to the main branch under a maintainer's name. How that access was obtained has not been disclosed.
  2. Trusted pipeline used to publish. The project's release workflow, holding the right to publish to npm, built and shipped 0.5.144 with valid provenance.
  3. Install-time execution. A preinstall hook ran the payload on every developer machine and CI runner that installed the version.
  4. Machine credentials harvested. The stealer collected npm, GitHub, cloud, Vault and Kubernetes credentials, SSH keys, .env secrets and AI tool configs.
  5. Stolen identities reused to spread. Stolen npm and GitHub access was used to republish the victim's own packages, plant fake workflows and repositories, and keep a hostage monitor on the stolen GitHub token.

Impact

  • Confirmed: a malicious, provenance-signed release of an SDK with about 12,000 weekly downloads was live on npm. Socket stresses that downloads do not equal infections.
  • Credentials at risk: any secret readable on a machine or CI runner that installed 0.5.144 should be treated as stolen, including npm, GitHub and cloud credentials.
  • Onward spread: the worm is built to republish packages owned by each victim, so a single install can seed new compromised packages. No count of downstream packages linked to this release has been published.
  • Destructive risk: the hostage token monitor can wipe a home directory if tokens are revoked before it is removed.
  • Not disclosed: the number of victims, how commit access was gained and whether Tensorlake's own secrets were exposed.

What this means for NHI and AI agent security

This is on an NHI list because every stage runs on machine identity. A release pipeline with the right to publish to npm did exactly what it was built to do, and the payload's targets are tokens, keys and service account credentials rather than passwords. The worm then reuses those registry and source control tokens to publish as its victims. As with the Shai-Hulud first wave and ChainDrop, the blast radius is set by how many packages each stolen token can publish. Stolen developer access was also behind the OVHcloud CLI compromise later the same month, where release files were swapped for a secret stealer.

The provenance point matters. Trusted publishing and Sigstore attestations prove a package came from a given repository and workflow. They do not prove the commit was legitimate. Protecting the publishing identity therefore means protecting the branch that feeds it: required reviews, signed commits and alerts on install scripts appearing in a release. The targeting of Claude, Cursor and MCP configuration files is a reminder that AI coding tools now hold keys worth stealing. See our npm Tokens Security Guide and AI Coding Agents Security Guide.

Finally, the hostage monitor changes incident response. The instinct is to revoke tokens first, but Socket advises removing the persistence before revoking anything. Playbooks for developer token theft should include that step.

Recommendations

  • Find every install of 0.5.144. Search lockfiles, caches and CI logs for tensorlake 0.5.144 and the tensorlake-native-* 0.5.144 packages, pin to 0.5.143 and treat affected hosts as compromised. See our CI/CD Pipeline Compromise Playbook.
  • Remove persistence before revoking tokens. Follow Socket's per-platform steps to remove the monitor first, then revoke and replace npm, GitHub, cloud, Vault and Kubernetes credentials from a clean machine. See the Leaked Credential Response Playbook.
  • Protect the branch that feeds publishing. Require reviews and signed commits on release branches, and restrict who can trigger publish workflows. See our GitHub and GitHub Actions Security Guide.
  • Limit what each publish token can reach. Use trusted publishing or short-lived, package-scoped tokens rather than long-lived tokens that can publish everything a maintainer owns. See our npm Tokens Security Guide.
  • Block install scripts by default. Use --ignore-scripts or an allow list in CI and on developer machines, and alert when a new release adds a preinstall hook.
  • Keep secrets off developer disks. Move cloud keys and tokens out of .env files and tool configs into a secrets manager or short-lived credentials. See our Secrets Management Guide.
  • Audit for planted files and repositories. Check for unexpected workflows, .claude/settings.json and .vscode/tasks.json changes, new public repositories and unexpected publishes under your accounts.

Frequently asked questions

Which tensorlake version was malicious?

tensorlake 0.5.144, published to npm on 8 October 2026. Endor Labs says 0.5.143 and earlier are not affected, and advises also treating the six tensorlake-native-* 0.5.144 packages from the same build as affected. The malicious version has been removed from npm.

Is the tensorlake malware Shai-Hulud?

Socket and Endor Labs link it to the ChainDrop and Shai-Hulud worm family because of its file layout, credential targets and self-republishing behaviour. Researchers have not attributed it to a named group, and the operator remains unknown.

Should I revoke my tokens straight away if I installed tensorlake 0.5.144?

Revoke them, but remove the persistence first. Socket warns that a PowerShell monitor checks the stolen GitHub token and can wipe the home directory if the token is revoked while it is running. Isolate the host, remove the monitor, then rotate every credential from a clean machine.

Shai-Hulud npm Worm, First Wave · Shai-Hulud npm Worm 2025 · Mini Shai-Hulud 2026 · OVHcloud CLI Compromise 2026 · npm Tokens Security Guide

How NHI Mgmt Group can help

Package worms succeed because publishing tokens and pipeline rights are broad, long-lived and rarely reviewed. We help teams map which identities can publish their software, cut token scope, move to short-lived credentials and build response playbooks that deal with persistence before revocation. See our NHI and AI agent security training.

References

PDF for subscribers

Take this breach analysis with you

The full analysis in one PDF: timeline, attack path, impact and recommendations, with links to the sources and related pages. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 26 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.