WritingDatabricks (DBRX)Databricks (DBRX)published Nov 23, 2026seen 4d

What 5,400 Malicious npm Packages Reveal about Software Supply Chain Risk in 2026

Open original ↗

Captured source

source ↗

What 5,400 Malicious npm Packages Reveal about Software Supply Chain Risk in 2026 | Databricks Blog Skip to main content

Summary

Hijacked real packages cause nearly all the exposure. Compromised legitimate packages are only 7% of the 5,400 malicious packages, but they account for over 99% of downloads.

Attackers have moved from stolen tokens to build pipelines. After npm revoked long-lived tokens, attackers took over CI environments and published through trusted publishing; 85% of trusted-published packages in the set are compromises.

AI development tools are a new target. Malicious MCP servers, packages that tamper with AI assistant configuration, and stealers of AI service keys are going after an attack surface that didn't exist two years ago.

Executive summary This report is the first of a series of blogs analyzing the supply chain threat landscape. In this first part, we analyzed approximately 5,400 confirmed malicious npm packages published between December 2025 and October 2026, the first year following npm's revocation of long-lived authentication tokens [1]. Eight findings follow. Exposure is concentrated in compromised legitimate packages. Attacker-created malware packages constitute 89% of the set but 0.2% of its recorded downloads. Compromised legitimate packages constitute 7% of the set and over 99% of downloads. Install-script controls address roughly half of observed malware. 54% of packages declare a lifecycle script; the remainder execute on import or invocation. The largest campaign of the period, exceeding one thousand packages directed at a single organization, declared a lifecycle script in 1% of packages and alternated between import-time execution and postinstall hooks across successive waves. Account compromise has shifted from stolen tokens to compromised build pipelines. The highest-exposure victims of the August 2026 self-replicating worm campaign were republished through OIDC trusted publishing from compromised CI environments. Of packages in the set published via trusted publishing, 85% are compromised legitimate packages; attacker-created packages use trusted publishing in 0.1% of cases. Attacker infrastructure is predominantly legitimate shared services. 38% of malicious packages communicate with a legitimate third-party service: serverless hosting, chat-platform webhooks, code-hosting and paste sites, request-capture endpoints, and in a small number of cases public blockchain RPC nodes used as dead-drop resolvers. Domain reputation does not distinguish this traffic from normal developer traffic. A distinct class of activity targets AI development tooling. MCP server packages that harvest credentials from the agent host, packages that modify AI assistant configuration and instruction files, and credential stealers specialized in AI service keys together form a population whose principal targets, MCP hosts and assistant configuration, did not exist as an attack surface two years ago. Offensive-security frameworks marketed as AI agents are distributed through npm. Agentic offensive security frameworks have begun appearing on the registry for open source distribution, bundling remote-access, cloud-credential and enterprise-identity tooling with modules for adversarial testing of AI systems. Public reporting has already observed threat actors making use of agentic tooling against exposed secrets. The registry is used as a distribution channel for payloads unrelated to the software supply chain. The registry offers attackers free, highly available hosting under a trusted domain, and its content is redistributed by public CDNs and mirrors; victims who never run the package manager can therefore be served a payload directly from npm infrastructure. Removal is slower than reporting, and attackers remove their own packages faster than the registry does. 87% of confirmed packages have a public advisory; unattributed packages receive one at a median of 1.7 days after publication. The registry's security takedown follows at a median of 7 days, with 10% exceeding 59 days. 37% of attacker-created packages were unpublished by their own publisher, at a median of seven hours, before any takedown. 16% remained installable at the time of this analysis.

Scope The dataset comprises packages detected by our scanner, which analyzes npm publish events for suspicious packages, with results filtered for precision by retaining only packages with at least one independent source: a public advisory, a vendor-published campaign report, an npm security takedown, or analyst review. Time is measured by npm publish date. The unit of record is the package version; a package is dated by its first malicious version. Download counts are monthly snapshots recorded at scan time. Registry active status was checked against the public registry on November 6, 2026.

Figure 1: Verdict Type by Month (%) Volume Monthly counts of confirmed malicious packages vary by a factor of fifteen across the period. The variation is attributable to a small number of campaigns: in August 2026 a single dependency-confusion campaign accounts for 78% of confirmed versions. When each campaign is counted as a single actor, activity is stable: several hundred new publisher accounts per month, a flat rate of malicious packages relative to total packages published, and spikes attributable to named campaigns.

Figure 2: Verified Malicious npm Packages by First-Publish Month Three changes are observable after this normalization: Compromise of legitimate packages is episodic. Activity is negligible in most months. Three waves of a single worm family occurred in May, June and August 2026; the May and August waves each compromised more than one hundred packages, and the June wave republished a vendor's entire scope in one day.

Figure 3: Legitimate-Package Compromise, Poisoned Versions by Month Dependency-confusion reconnaissance is continuous , present in every month at a consistent level. Obfuscation increased. The share of actors whose packages trigger an obfuscation rule more than doubled between May and August 2026. Targeting of AI-developer credentials remained at 1-4% of packages throughout the year; absolute counts rose with volume. Theft of npm authentication tokens peaked at 22% of packages in March 2026 and fell below 5% from May. Classic long-lived tokens had been revoked on December 9, 2025; the tokens targeted in this period were plausibly granular access tokens and CI secrets....

Excerpt shown — open the source for the full document.

Notability

notability 5.0/10

Substantive security analysis post from Databricks