npm Package Security in Focus After Malicious Release and Inventory Expansion

Última actualización: 10/20/2026
  • [email protected] was reported as a malicious npm release with valid provenance and a preinstall payload aimed at developer machines.
  • The malware sought credentials, spread through stolen npm and GitHub tokens, and installed a token monitor that could delete a home directory if a token was revoked.
  • Cleanup guidance stressed removing the monitor before rotating credentials, then checking for persistence and spread.
  • Workbrew 2.0 expanded its catalog to npm packages and VS Code extensions, adding visibility and vulnerability flags alongside Homebrew inventory.

npm packages security overview

The JavaScript world leans on npm packages for tiny helpers, build tools, frameworks, and almost everything in between, which makes the registry an obvious target for supply chain attacks. Two recent developments, one about a poisoned release and one about broader package inventory, keep returning to the same question: how well do organizations really know the third-party code running in pipelines and on developer laptops?

In the first case, StepSecurity described [email protected] as a malicious npm version. In the second, Workbrew said its 2.0 catalog now covers npm packages together with Homebrew and VS Code extensions. The actors and products are different, but both stories underline a practical need for visibility, policy enforcement, and a response plan that goes beyond a one-time scan.

Tensorlake npm package compromised
Related article:
Tensorlake npm Package 0.5.144 Compromised by Shai-Hulud Worm

Compromised tensorlake release draws scrutiny

StepSecurity said its AI Package Analyst flagged [email protected] by examining the published tarball rather than waiting for a reputation feed. According to the report, malicious changes were pushed directly to the main branch of the tensorlakeai/tensorlake repository under a maintainer’s identity, with no pull requests, and the release workflow later published the package from that same repository. That matters because npm showed a valid provenance attestation for the release; such an attestation can confirm where a package was built, but it does not prove that the code is safe.

The first suspicious commit reportedly landed at 01:20 UTC on October 7, and several more followed within hours. Those commits adjusted the payload and added a preinstall line to package.json, while the files in the npm package matched the repository’s main branch. The reported timeline puts npm publication at 01:12 UTC on October 8, again under the same maintainer identity.

npm package inventory and security

ataque a paquetes npm
Related article:
Massive npm Supply Chain Attacks: Mini Shai-Hulud, Phishing, and Credential Theft

What the install hook did

Installing the affected version caused the preinstall hook to launch setup.mjs. The script skipped itself on CI systems, according to the report, which made developer workstations the main target. It downloaded the Bun runtime and used it to run an obfuscated 856 KB file; StepSecurity said its team decoded that file without executing it.

The collection scope was wide. It sought GitHub and npm tokens, cloud credentials, Kubernetes and Vault secrets, SSH keys, saved browser logins, and configuration files for AI tools such as Claude, Cursor, and Windsurf. The stolen data was encrypted and sent either to a public GitHub repository created in the victim’s account, described with the phrase ‘Shai-Hulud: Here We Go Again’, or to iseekaigogo.com.

Spread through stolen tokens

The malware did not stop with one machine. With a stolen npm token, it reportedly downloaded the victim’s packages, inserted itself, raised version numbers, and republished them. With a stolen GitHub token, it committed .claude/settings.json and .vscode/tasks.json files into reachable repositories, using a fake author address and a routine dependency-update message. Those files could cause the code to run again when a project was opened in Claude Code or VS Code.

npm attack
Related article:
Shai-Hulud npm Worm Resurfaces After Months of Silence, Bypassing New Registry Scans

That second path is important because it turns a package install into a persistence mechanism inside source control. A developer might clean node_modules and still reopen a repository containing files that trigger the payload. The report also noted that the affected version could still be downloaded from npm when its team checked.

The token monitor and cleanup order

The most unusual element was a hostage-style token monitor. If a GitHub token was available, the payload installed a small service called gh-token-monitor. For up to 24 hours, it checked the token against GitHub’s API every 60 seconds. If GitHub rejected the token, the service ran a destructive command against the user’s home directory on Linux or macOS, or a PowerShell deletion of the user profile on Windows.

Because of that trap, the usual first reaction, revoking the GitHub token, could trigger data loss. StepSecurity’s guidance was to remove the monitor before rotating credentials, after backing up files that cannot be lost. Its suggested order was to check for [email protected] with npm ls and lockfiles; see whether tensorlakeai/tensorlake main had been cloned or pulled since October 7 and npm install run in typescript/; pin [email protected]; delete node_modules and clean the npm cache; add ignore-scripts=true in .npmrc; remove the gh-token-monitor folder and service; and only then revoke and replace credentials. On Linux and macOS, that meant disabling a user service and deleting related files; on Windows, checking Task Scheduler for a logon task running monitor.ps1.

npm
Related article:
ChainDrop: The npm Worm That Poisoned Hundreds of Packages in Hours

After the monitor was gone, teams were advised to rotate npm tokens, cloud keys, SSH keys, Kubernetes and Vault credentials, .env secrets, AI tool keys, and browser-saved passwords. They were also told to look for new public repositories with the Shai-Hulud description, commits from [email protected], and unexpected .claude or .vscode files. If cleanliness could not be confirmed, a full wipe and reinstall was the safer path; even when the hook skipped CI, the report advised rotating secrets that the job could see anyway.

Tooling responds to npm supply chain risk

StepSecurity used the incident to highlight several controls. Its Secure Registry blocks known malicious packages and versions at download time, including [email protected] by default, and follows an OSS security feed so newly republished malicious versions can be blocked as they are identified. Installing the known bad version fails closed rather than depending on someone reading an advisory first. Its GitHub checks can fail a pull request that adds a compromised dependency or adopts a version inside a cooldown window.

The company also pointed to developer machine inventory, since the payload skips CI. Dev Machine Guard records installed npm packages and AI agent tooling across enrolled devices, which lets security teams search for the affected version and spot unexpected editor or agent configuration files. It also checks enrolled machines against suspicious file rules and known hashes. OSS Package Search indexes package use across repositories and pull requests, including transitive dependencies that nobody added on purpose.

AsyncAPI npm Supply Chain Attack
Related article:
AsyncAPI npm Supply Chain Attack Delivers Multi-Stage Malware to 2 Million+ Weekly Downloads

For programmatic audits, StepSecurity said compromised components from its Threat Center are available through an authenticated API, so teams can pull name@version pairs into their own tooling and compare them with lockfiles. Its Threat Center alert includes affected versions, indicators, and triage steps that can flow into SIEM workflows. Its MCP server also exposes incident and exposure data to AI coding agents, separating CI checks from developer-machine checks.

The reported indicators include the npm package [email protected], SHA-256 hashes 25a0735d0db7dc40e5d45ce42d9c106067e6a66e184d967cfecfab17c3bcb5ef for lib/setup.mjs and b50a00900399ba99fb6ce1fc151519cb99d44320ef2a631f2237e1aea0ad6fec for lib/Math_Symbol.js, the domain iseekaigogo.com, the GitHub repository description, the fake commit author [email protected], and files on disk such as ~/.config/gh-token-monitor/ and ~/.local/bin/gh-token-monitor.sh.

Workbrew Catalog broadens npm coverage

Separately, Workbrew announced that its 2.0 release expands the Workbrew Catalog beyond Homebrew to millions of packages across npm and VS Code extensions. The company said customer interest in extending visibility beyond Homebrew, including other package managers, direct downloads, and editor extensions, drove the move. Workbrew framed the effort as extending its original goal of governing unmanaged Homebrew installs without slowing developers. Workbrew 1.11 had introduced the catalog groundwork; the 2.0 update takes it into the JavaScript ecosystem behind Node.js and into editors that use the VS Code extension API, such as Cursor, Windsurf, and Google Antigravity.

NPM phishing packages
Related article:
NPM Packages Abused as Free Hosting for Phishing CAPTCHA Pages

In practice, npm packages and VS Code extensions appear alongside Homebrew packages in one inventory, matched against the catalog with known vulnerabilities flagged. On higher-tier plans, Workbrew can also manage discovered software, with automatic patching and policy-based remediation. The catalog can be explored without an account, and the free Team plan offers additional visibility into a fleet.

Why the two developments sit together

One story describes an attacker exploiting trust in a package release; the other describes a vendor widening the lens on what is installed. Read together, they show why provenance alone is not enough and why package inventories need to cover build pipelines and individual machines. A valid attestation can answer where an artifact came from, but it cannot answer whether a maintainer account was misused or whether a preinstall script has a hostile purpose.

They also show that response plans need sequencing. Blocking a bad version at the registry is valuable, but it does not help if the package already ran on a laptop and left a delayed destructive service behind. Likewise, an inventory that lists the package is useful, but it must be paired with a cleanup procedure that removes persistence before credentials are changed.

The tensorlake incident and Workbrew’s catalog expansion point to the same operational reality: npm packages are both a major source of software and a serious attack surface. Teams need current inventories, blocked malicious versions, careful pull request checks, and a cleanup playbook that accounts for install hooks and hidden persistence. The exact tools may differ, but the basics are consistent: know what is installed, know where it ran, and remove the trap before rotating the keys.

npm Trusted Publishing flaw
Related article:
npm Trusted Publishing flaw tied to SlugFest let attackers reclaim GitHub slugs
Related posts: