Skip to content
The Cybersecurity Focus
The Cybersecurity Focus

Cybersecurity news, threat intelligence, and vulnerability research.

The Cybersecurity Focus

Cybersecurity news, threat intelligence, and vulnerability research.

  • Home
  • Home
The Cybersecurity Focus

Cybersecurity news, threat intelligence, and vulnerability research.

The Cybersecurity Focus

Cybersecurity news, threat intelligence, and vulnerability research.

  • Home
  • Home
exploitVulnerabilityWorm

Tensorlake npm Package Compromised by Shai-Hulud Credential-Stealing Worm

By ogwatermelon
October 8, 2026 5 Min Read
0
October 8, 2026

The npm package tensorlake was compromised on October 8, 2026, in a ChainDrop supply chain attack. Malicious version 0.5.144 contained the Shai-Hulud credential-stealing worm. The malware harvests developer credentials, establishes persistence, and spreads to other packages. It also deploys a hostage token that wipes the victim’s home directory if stolen GitHub tokens are revoked.

What Happened: Tensorlake npm SDK Compromised by Shai-Hulud Worm

On October 7, 2026, an attacker pushed malicious files to the main branch of the tensorlakeai/tensorlake GitHub repository. The commits appeared under a maintainer’s name. Seven commits followed over the next several hours. They refined the payload and added a preinstall hook to package.json. None of the commits went through a pull request.

At 01:12 UTC on October 8, the repository’s release workflow published version 0.5.144 to npm. The package carried a valid npm provenance attestation because it was built from the real repository. Consequently, the attestation confirmed the build origin but did not guarantee the code was safe. Socket detected the malicious release at 01:23 UTC, approximately eleven minutes after publication. StepSecurity also flagged the release through its AI Package Analyst.

Version 0.5.144 is no longer available from the npm registry. However, developers who installed it during the exposure window remain at risk. The package receives roughly twelve thousand weekly downloads and has over one thousand GitHub stars. Those figures reflect overall package popularity, not confirmed infections.

Technical Details of the Shai-Hulud Supply Chain Attack

The attack follows the ChainDrop pattern first documented in August 2026. A preinstall hook in package.json launches lib/setup.mjs, an obfuscated loader. The loader downloads the Bun runtime and executes lib/Math_Symbol.js, an obfuscated 856 KB payload. The hook skips execution in CI environments, so developer machines are the primary target.

Credential Harvesting Targets

The payload steals a wide range of credentials and secrets. The stolen data is encrypted and exfiltrated to a public GitHub repository created in the victim’s account. The repository description reads “Shai-Hulud: Here We Go Again.” An alternative exfiltration path uses the domain iseekaigogo.com. The malware resolves its command-and-control endpoint through an Ethereum contract rather than a hardcoded domain.

  • npm tokens from .npmrc files and the npm token API
  • GitHub tokens checked for repository and workflow permissions
  • AWS credentials and secrets from IMDS, ECS, Secrets Manager, and SSM
  • HashiCorp Vault credentials from local instances at 127.0.0.1:8200
  • Kubernetes service-account tokens and kubeconfig files
  • SSH keys, .env files, and cryptocurrency wallets
  • Messaging app data and saved browser logins
  • Configuration and MCP files for Anthropic Claude, Cursor, Kiro, Windsurf, and Zed

Persistence and Propagation

The malware establishes persistence on the host by writing .claude/settings.json and .vscode/tasks.json files into repositories it can reach. When another developer opens the project in Claude Code or VS Code, the malware runs again. This technique turns legitimate developer workflows into reinfection vectors.

To propagate, the worm enumerates packages associated with the victim’s publishing identity. It builds Sigstore provenance and republishes compromised versions. With stolen GitHub tokens, it also commits hidden configuration files to the victim’s repositories using a fake author identity.

The Hostage Token Dead-Man Switch

A distinctive component of this attack is the hostage token mechanism. When the malware captures a GitHub token, it installs a persistent service called gh-token-monitor. The service polls api.github.com/user every sixty seconds for up to twenty-four hours. If the token is revoked, the service executes an attacker-supplied handler through Invoke-Expression on Windows or rm -rf ~/ on Linux and macOS.

This means the obvious remediation step, revoking the stolen token, is exactly what triggers data destruction. Security teams must remove the token monitor before rotating credentials.

Business and Operational Impact

The Tensorlake compromise extends beyond a single npm package. It targets the intersection of open-source software supply chains and AI agent infrastructure. Organizations using Tensorlake SDK face several categories of risk.

  • Credential exposure: Any secret accessible to the installing process may be stolen, including cloud credentials, Vault secrets, and Kubernetes tokens.
  • Repository compromise: Stolen GitHub tokens let attackers modify source code, inject malware into other projects, and abuse CI/CD pipelines.
  • Package propagation: The worm republishes compromised versions of the victim’s own packages, spreading the infection downstream.
  • AI tool contamination: Hidden configuration files in .claude and .vscode directories turn AI coding agents and editors into reinfection vectors.
  • Data destruction: The hostage token mechanism introduces a destructive payload that activates during standard incident response.

Tensorlake provides isolated sandboxes for running untrusted LLM-generated code. A compromised SDK creates exposure on the machine that installs it, before any generated code reaches a sandbox. This timing makes the threat especially difficult to contain.

Mitigation and Recommendations

Immediate Actions for Defenders

  1. Check for the malicious version. Run npm ls tensorlake and inspect lockfiles for version 0.5.144. Also check whether anyone cloned or pulled tensorlakeai/tensorlake main since October 7 and ran npm install in the typescript directory.
  2. Pin to a clean version. Install tensorlake@0.5.143, delete node_modules, and run npm cache clean --force. Set ignore-scripts=true in .npmrc to prevent install hooks from running.
  3. Remove the token monitor first. On Linux, run systemctl --user disable --now gh-token-monitor.service and remove ~/.config/gh-token-monitor/. On macOS, unload the launch agent and delete the monitor files. On Windows, remove the logon scheduled task running monitor.ps1.
  4. Revoke credentials only after step three. Once the monitor is removed, revoke the stolen GitHub token. Then replace all other potentially exposed secrets.
  5. Audit for spread. Search GitHub accounts for new public repositories with the “Shai-Hulud” description, commits from claude@users.noreply.github.com, or unexpected .claude and .vscode files.

Long-Term Recommendations

Organizations should treat this incident as a signal to strengthen supply chain security around AI tooling. Consider the following measures.

  • Enable package cooldown policies. Block newly published versions in a cooldown window to give the security community time to detect compromises.
  • Scan npm packages before installation. Use automated tools that analyze tarball contents rather than relying solely on provenance attestations.
  • Inventory developer machines. Maintain visibility into installed npm packages, AI agent configurations, and editor settings across developer devices.
  • Restrict lifecycle scripts. Require explicit approval for install hooks in production and CI environments.
  • Monitor for unauthorized GitHub commits. Alert on commits from unrecognized authors or unexpected file modifications in .claude and .vscode directories.

Bottom line: The Tensorlake compromise demonstrates how supply chain attackers are targeting AI agent infrastructure with sophisticated, self-propagating malware. The hostage token mechanism turns standard incident response into a destructive event. Remove the monitor before revoking any credentials.

Incident Summary

Incident: Tensorlake npm package compromised by ChainDrop / Shai-Hulud worm
Affected Package: tensorlake@0.5.144
Disclosure Date: October 8, 2026
Malicious Commit Date: October 7, 2026, 01:20 UTC
npm Publish Date: October 8, 2026, 01:12 UTC
Patch Status: Version 0.5.144 removed from npm registry; use 0.5.143
Severity: Critical supply chain compromise
Exploitation Status: Confirmed in the wild

References

  1. The Hacker News, “Tensorlake npm Package Compromised to Deliver Shai-Hulud Credential-Stealing Worm,” October 8, 2026. https://thehackernews.com/2026/10/tensorlake-npm-package-compromised-to.html (accessed October 8, 2026).
  2. Socket Research Team, “TensorLake npm SDK Compromised in ChainDrop Shai-Hulud Credential-Stealing Attack,” October 8, 2026. https://socket.dev/blog/tensorlake-compromise (accessed October 8, 2026).
  3. StepSecurity, “Tensorlake npm Package Compromised: A Worm With a Hostage Token That Wipes Your Machine If You Revoke It,” October 8, 2026. https://www.stepsecurity.io/blog/tensorlake-npm-compromised-hostage-token-worm (accessed October 8, 2026).
  4. Tensorlake GitHub Issue #1014, “Security incident report for tensorlake@0.5.144,” October 8, 2026. https://github.com/tensorlakeai/tensorlake/issues/1014 (accessed October 8, 2026).
  5. The Hacker News, “Open VSX Removes 77 Malicious Evil-Twin Extensions Pushing Mini Shai-Hulud Worm,” August 2026. https://thehackernews.com/2026/08/open-vsx-removes-77-malicious-evil-twin.html (accessed October 8, 2026).

Tags:

ExploitVulnerabilityWorm
Author

ogwatermelon

Follow Me
Other Articles
Previous

Hackers Hijack Official App to Send Extortion Notifications to Millions

Next

Cisco Critical NX-OS Flaws Enable Nexus Switch Takeover

AI Botnet Breach CVE Exploit Hack Incident Infostealer KEV Linux Mac Malware Network News Phishing Ransomware RCE supp supply chain Virtualization Vishing Vulnerability Windows World Worm Zero Day

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Archives

  • October 2026
  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026

Categories

  • AI
  • Apple
  • BotNet
  • Breach
  • CVE
  • exploit
  • Hack
  • Incident
  • Infostealer
  • KEV
  • Linux
  • Mac
  • Malware
  • News
  • Phishing
  • Ransomware
  • RCE
  • supply-chain
  • Uncategorized
  • Virtualization
  • Vishing
  • Vulnerability
  • Windows
  • World
  • Worm
  • Zero Day
Copyright 2026 — The Cybersecurity Focus. All rights reserved.