Malicious npm Package Reached 2 Million Weekly Downloads Before Detection

Malicious npm Package Reached 2 Million Weekly Downloads Before Detection

AI-generated editorial illustration; not a documentary photograph.

A malicious npm package disguised as a B-tree indexing utility reached 2 million weekly downloads before detection, according to security firm Checkmarx as reported by SecurityWeek. The campaign used code hidden in the package's JavaScript prototype rather than an install script, helping it bypass protections aimed at that more familiar attack path.

Trust built around a lookalike

The package, indexed-btree, mimicked the legitimate sorted-btree utility. Rather than immediately compromising a highly popular package, the attacker created a GitHub repository and populated it with apparently legitimate commits. That activity appears to have been used to make the project look established to developers evaluating the dependency.

What the payload does

The malicious logic was placed in BTree.prototype.set, a core method in the library. When triggered, it runs a first-stage payload that gathers system information and sends it to a hardcoded Slack channel and Telegram chat. The malware then connects to a blockchain contract on Sepolia, retrieves and decrypts a second stage, and removes traces of its activity.

Broader package campaign

Checkmarx linked indexed-btree to several other packages, including ordered-kv-index, btree-leaderboard, priority-slot-queue, btree-range-store, btree-core, btree-time-index, btree-lru-cache, neighbor-key-map and sliding-score-window. Those packages had accumulated more than 5 million downloads when they were removed, according to the report.

Attribution and limits

The command-and-control contract was previously associated with the mutex-forge package, Checkmarx says. The security firm estimates that the threat actor made 109 ETH, described in the report as nearly $300,000. That figure is an attribution-based estimate, not independently verified revenue. The report describes the campaign as ongoing and does not establish how many organizations executed the payload or what systems were compromised.

Source: Malicious B-tree NPM Package Accumulates Millions of Downloads

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *