Official cover image from the Databricks Threat Research post on 5,400 malicious npm packages.
Official cover image from the Databricks Threat Research post., Databricks

On 23 November 2026, Databricks Threat Research published an analysis of about 5,400 confirmed malicious npm packages whose first malicious versions appeared between December 2025 and October 2026. That window is the first year after npm revoked long-lived classic tokens on 9 December 2025. A GitHub changelog issued that day said classic tokens were permanently revoked, that npm login would use two-hour session tokens, and that continuous integration should use granular tokens.

The finding that can be checked is an exposure split, not a typo-squat census. Compromised legitimate packages are 7 percent of the set and more than 99 percent of recorded downloads. Attacker-created malware packages are 89 percent of the set and 0.2 percent of those downloads. Among packages in the set that were published through trusted publishing, 85 percent are compromises.

[1][2]

The authors are Alessandra Rizzo, Panos Sakkos, and Ariel Ropek, writing for Databricks Threat Research. The dataset is packages flagged by their scanner of npm publish events, then kept only if at least one independent source also pointed to them: a public advisory, a vendor campaign report, an npm security takedown, or analyst review. A package is dated by its first malicious version. Download counts are monthly snapshots recorded at scan time, not lifetime totals. Registry status was checked on 6 November 2026. These are Databricks's measurements. This desk has not re-scanned the registry.

Monthly counts vary by a factor of fifteen. In August 2026, a single dependency-confusion campaign accounts for 78 percent of confirmed versions that month. The authors say all compromise waves in the period belong to one family, first a single actor's toolkit and later open-sourced for free use in May. Three worm waves arrived in May, June, and August 2026. The May and August waves each compromised more than one hundred packages. In June, the same kit republished a single vendor's entire scope in one day through trusted publishing. Outside those waves, compromise occurs at a rate of a few packages a month.

The downloads are concentrated. Eighty-one percent of attacker-created packages had no downloads at scan time. The ten most-downloaded packages account for over 99 percent of recorded downloads, and all ten are compromised legitimate packages. Typosquatting is a minority tactic: 13 percent of packages embed a popular package name, and under 5 percent are within two character edits of one. Most attacker-created packages, the authors say, employ no lure and are retrieved by misconfigured builds rather than chosen by users.

The highest-exposure victims of the August worm were republished through OIDC trusted publishing from compromised continuous-integration environments, rather than through stolen tokens. Trusted publishing here means the registry accepts a short-lived identity assertion from a designated pipeline, instead of a long-lived token in a developer's account. Databricks infers that the December 2025 revocation pushed maintainers toward that path, and that later activity targeted the pipeline itself. Attacker-created packages used trusted publishing in 0.1 percent of cases.

Fifty-four percent of packages declare a lifecycle script, a hook that runs at install time. The rest, the authors say, execute on import or invocation. Ninety-nine percent of malicious packages come from single-maintainer accounts. Targeting of AI-developer credentials stayed at 1 to 4 percent of packages through the year. Theft of npm tokens peaked at 22 percent of packages in March 2026 and fell below 5 percent from May. Because classic tokens had already been revoked, the authors say the tokens targeted later were plausibly granular access tokens and CI secrets. That last clause is their inference, not a measurement in the GitHub changelog.

Public reporting was faster than registry removal. Eighty-seven percent of confirmed packages have a public advisory. Unattributed packages receive one at a median of 1.7 days. The registry takedown follows at a median of about seven days, with 10 percent exceeding 59 days. Thirty-seven percent of attacker-created packages were unpublished by their own publisher, at a median of about seven hours. Sixteen percent remained installable at the time of the analysis. Thirty-eight percent communicate with a legitimate third-party service, which is why the authors warn against relying on domain reputation alone for build-time egress control.

[1][2]

The useful distinction is between how many malicious packages exist and which ones people actually install. A typo-squat can swell a catalog and still have no users. A hijacked package that already has a download base carries that traffic with it. In this dataset, almost all of the recorded downloads sit there.

The token revocation changed the high-exposure path without removing that concentration. Once classic tokens were gone, a popular package could still be republished if an attacker reached the continuous-integration environment allowed to publish it. Trusted publishing then attests which pipeline produced the package. It is not, on the authors' own recommendation, assurance that the pipeline was clean. They put it directly: treat trusted publishing as provenance, not assurance.

Install-script controls still matter, and they are incomplete. They catch hooks that run at install time, including, the authors say, all worm-compromised versions in this set. They miss malware that waits until the package is imported or invoked. Seventy-eight percent of compromised versions add or modify a lifecycle script. That is a detection hook, not a complete defense.

[1][2]

The numbers are Databricks's, from a scanner filtered for precision, not a census of every malicious npm package published in the period. Packages that never tripped the scanner, or that lacked an independent confirmation, are outside the set. Download counts are snapshots at scan time, so timing can over- or under-weight a short-lived package. The report states the 7 percent and 89 percent shares without, in the prose reviewed here, itemizing every remaining package in the set.

This desk has not independently reproduced the 7 percent and 99 percent split, the 85 percent trusted-publishing figure, or the campaign attributions. Until an independent team repeats the measurement on the same window, the exposure thesis remains a vendor-research claim with a clear method, not a widely reproduced one.

[1][2]

A fair reading does not require anyone to ignore attacker-created packages. Those packages are still the majority of the set, and install-script controls still catch a real share of them, plus all of the worm-compromised versions described here. Teams that block install hooks and pin lockfiles are not wasting their time.

The download metric can also over-weight a handful of popular hijacks. If ten packages account for more than 99 percent of recorded downloads, the exposure story is partly about a small number of widely used names. That concentration is consistent with the authors' thesis, and it also limits how far the same percentages can be generalized. After classic tokens were revoked, the residual download exposure in this set still sat in compromised legitimate packages, including packages that arrived through trusted publishing.

[1][2]

The next six months should be about whether that exposure split holds in a later window, and whether high-download compromises continue to arrive through trusted publishing from continuous-integration systems. Watch whether npm token theft stays below the 5 percent level seen from May 2026, or whether a new secret class takes its place. Watch how quickly advisories and registry takedowns move, especially for the share that remained installable in this analysis.

Do not treat typo-squat hunting as the main control on the basis of this report. The authors' own figures point elsewhere: to maintainer and pipeline compromise on packages people already install, and to a publishing method that attests origin without attesting that the origin was safe.

[1][2]