CVE Tools
The Tensorlake npm Worm Was Caught in 11 Minutes — But It Had Already Written Itself Into Developers' Claude Code and VS Code Configs. A hijacked maintainer account turned one npm package into a cre

The Tensorlake npm Worm Was Caught in 11 Minutes — But It Had Already Written Itself Into Developers' Claude Code and VS Code Configs

A hijacked maintainer account turned one npm package into a credential-stealing worm with a destructive dead-man's switch — and the first confirmed ChainDrop/Shai-Hulud jump into AI coding-assistant config files.

On October 7, 2026, someone pushed a verified commit to the Tensorlake SDK's GitHub repository under a real maintainer's identity. Twenty hours later, that commit's payload went out to every developer who installed the package. Socket's automated scanning caught the malicious release in just over eleven minutes — but by the time npm pulled it, the worm had already learned a new trick: writing itself into .claude/settings.json and .vscode/tasks.json so it re-runs the next time a developer opens the project in Claude Code or VS Code.

11m 3stime from malicious npm publish to Socket's detection
~12,000/wkaverage weekly downloads of the tensorlake package
0.5.144the single compromised version
20 hrsdwell time between the rogue commit and the publish it triggered

Twenty hours in, eleven minutes out

How the compromise played out

  1. Attacker pushes a verified commit (41b38f0) to the Tensorlake SDK's main branch under a real maintainer's GitHub identity.
  2. Repository sits compromised for roughly 20 hours while the malicious code waits for the next scheduled release-workflow run.
  3. CI publishes `tensorlake@0.5.144` to npm, with the payload embedded in a chained preinstall script.
  4. Socket's automated scanning flags the release — 11 minutes 3 seconds after publish.
  5. npm removes 0.5.144; Tensorlake ships a clean 0.5.145.
  6. Maintainer David Lorenzo (npm handle "calavera") confirms Tensorlake's security advisory, GHSA-8g63-53c9-65j2, and closes the incident.
  7. Tensorlake ships PR #1016 hardening the release pipeline — admin bypass removed, signed commits required, a second reviewer on npm publishes, a CI tripwire for declared install scripts — and the package reaches 0.5.148.

What actually ran on your machine

The malicious version chained its install: lib/setup.mjs dropped the Bun runtime, which then executed lib/Math_Symbol.js — an obfuscated Shai-Hulud payload carrying a global WORMTAG marker researchers used to confirm this was a fresh compromise, not a reinfection from an earlier Shai-Hulud wave. Because npm preinstall scripts run with the permissions of whatever process is installing the package, it executed directly on the developer's laptop or CI build server.

  • CI/CD and cloud environment variables — AWS, HashiCorp Vault, Kubernetes service accounts, GitHub Actions secrets
  • Credential files on disk — SSH keys, cloud CLI configs, password-manager vaults
  • 14 cryptocurrency browser-extension wallets, via a remotely-pulled HackBrowserData binary for browser-stored credentials
  • A live outbound connection to attacker infrastructure for further commands

The part that's new: it writes itself into your AI tools

Earlier Shai-Hulud/ChainDrop waves stopped at stealing and re-publishing. This one added malicious execution entries into .claude/settings.json and .vscode/tasks.json inside reachable repositories — configuration files both tools read and act on automatically. The effect: even after credentials are rotated, the worm can re-trigger the next time that developer opens the same project in Claude Code or VS Code, because the task definitions are sitting right there in version-controlled config, waiting to run again.

From maintainer compromise to reinfection

  1. Maintainer account compromised
  2. Malicious commit pushed to main (41b38f0)
  3. CI publishes tensorlake@0.5.144 to npm
  4. preinstall script runs, unsandboxed, on dev machine/CI
  5. Obfuscated Bun payload executes
  6. Credentials + crypto wallets harvested
  7. gh-token-monitor persistence installed
  8. Malicious tasks written to .claude/settings.json + .vscode/tasks.json
  9. GitHub token revoked?
  10. Home directory wiped
  11. Worm waits, reinfects on next Claude Code/VS Code open

The hostage token

When the payload captures a GitHub token from an account with no organization memberships, it installs a watchdog — a systemd user unit on Linux, a LaunchAgent on macOS, a logon scheduled task on Windows, named gh-token-monitor — that polls api.github.com/user every 60 seconds for up to 24 hours. If GitHub reports the token invalid, the watchdog runs rm -rf ~/ on Linux/macOS or deletes the user profile on Windows. Researchers found the code's own string for this behavior: IfYouRevokeThisTokenItWillWipeTheComputerOfTheOwner.

Why "just revoke the token" backfires here

Standard credential-theft runbook
  • Identify the compromised package or token
  • Revoke the leaked token immediately
  • Rotate remaining credentials
  • Audit for lateral movement
Works for ordinary credential theft — not for this watchdog.
What this incident actually requires
  • Isolate the host at the network level first (EDR quarantine or physically disconnect)
  • Terminate the gh-token-monitor process/service before anything else
  • Purge the malicious entries from .claude/settings.json and .vscode/tasks.json
  • Only then rotate tokens — from a separate, clean, out-of-band machine
Revoking the token before isolating the host can trigger the destructive wipe.

ChainDrop's second act, not a new campaign

ChainDrop first surfaced in August 2026, when a compromised maintainer identity and a valid-but-meaningless provenance signature turned keyv, cacheable, and nine other packages into a self-propagating credential harvester across 1,300+ package versions and roughly 2 billion monthly downloads — a campaign we covered in depth. The Tensorlake incident is far narrower in blast radius, but it is the same worm family extending into new territory: developer tooling built specifically for AI-agent workflows.

MetricAugust 2026 — keyv/cacheable waveOctober 2026 — Tensorlake
Packages compromised11 packages, 1,300+ versions1 package, 1 version (0.5.144)
Spread mechanismStolen npm tokens used to self-propagate across dependentsSingle compromised maintainer GitHub account; no onward propagation confirmed
Download exposure~2 billion monthly downloads across the affected tree~12,000 weekly downloads of tensorlake itself
CVE assignedNone — compromised identity, not a code vulnerabilityNone — same pattern
New technique introducedA valid provenance signature on malicious codePersistence written into .claude/settings.json and .vscode/tasks.json
Time to detectionSpread before being caught and documentedSocket flagged it in 11 minutes 3 seconds

What to check if you run Tensorlake

  1. Check lockfiles, install logs, and build artifacts for tensorlake@0.5.144 specifically; block further installs of that version.
  2. Isolate any suspect host at the network level before touching tokens — disconnect it or quarantine it with EDR.
  3. On that isolated host, find and terminate the gh-token-monitor process/service (systemd unit, LaunchAgent, or scheduled task) before revoking anything.
  4. Search reachable repositories for malicious entries added to .claude/settings.json and .vscode/tasks.json and remove them.
  5. Only then rotate GitHub, npm, cloud, and browser-stored credentials — from a separate, known-clean machine.
  6. Audit recent package releases in your dependency tree and rebuild affected workstations from trusted sources.
Known indicators4 rules
other ×4

No Sigma, Suricata, or Nuclei rule has been published for this incident as of writing — these are the confirmed static indicators from researcher writeups, not a signature you can deploy as-is.

Compromised package version
npm package tensorlake, version 0.5.144 — malicious; superseded by 0.5.145, hardened further through 0.5.148
Tensorlake security advisory GHSA-8g63-53c9-65j2 / npm registry
Malicious payload files
lib/setup.mjs (drops Bun runtime) → lib/Math_Symbol.js (obfuscated Shai-Hulud payload, global WORMTAG marker)
C2 domain
iseekaigogo[.]com — hardcoded; backup C2 resolved via an Ethereum smart-contract dead-drop queried through public RPC endpoints (eth.llamarpc.com, rpc.ankr.com, ethereum.publicnode.com)
Persistence / dead-man's-switch service
Watchdog service named gh-token-monitor (systemd user unit / LaunchAgent / scheduled task), polling api.github.com/user every 60s for up to 24h
We have not seen any usage of this version since it was released.
— Tensorlake security advisory, GHSA-8g63-53c9-65j2 (a vendor telemetry statement based on SDK user-agent monitoring, not an independently audited count)

Data as of 2026-10-22