A study of about 5,400 confirmed malicious npm packages shows that software supply chain attacks on npm look different from how most developers picture them. The packages were published between December 2025 and October 2026, the first year after npm revoked long-lived authentication tokens. Most were junk that nobody downloaded. A small group of hijacked legitimate packages accounted for nearly all the real damage.
A few campaigns drive the spikes
Monthly counts of malicious packages swung by a factor of fifteen. A handful of campaigns explain it: in August 2026, one dependency-confusion campaign made up 78% of confirmed versions. Count each campaign as one actor and the picture flattens out. Several hundred new publisher accounts appear each month, and the share of malicious packages among all publishes stays flat.
Hijacks of legitimate packages are rare and come in waves. A single worm family struck in May, June and August 2026. The May and August waves each compromised more than 100 packages. In June, the same open-source kit republished a vendor’s entire scope in one day. Outside those waves, compromises ran at a few packages a month.

What the attackers’ packages look like
Almost every malicious package comes from a throwaway account. 99% came from single-maintainer accounts, and 55% of accounts used a free-mail address. Two thirds published exactly one malicious package. North Korea-linked campaigns ran several hundred accounts at one or two packages each, with 83% on free-mail addresses.
The packages themselves tend to be new and bare:
- 88% were under 30 days old when the malicious version went out.
- 75% declared no repository, and 66% had a single version.
- 65% still carried default values from npm init.
- 54% declared a lifecycle script, and 17% used an internal-looking name such as core, utils, sdk or config.
Typosquatting is a minority tactic. Only 13% embed a popular package name, and under 5% sit within two character edits of one. Attackers mostly count on misconfigured builds pulling their packages in, which is why 81% had no downloads when scanned.

What the malware does
72% of packages carry an obfuscation marker and 30% fetch a second stage. Credential and data theft is the main behavior in every month except August, when many credential stealers were built to drop a Sliver command-and-control implant on the victim’s machine.
Of the stealers, 45% go after a single class of credentials and 36% after three or more. Cloud credentials, SSH keys and .env files often show up together. AI-developer credentials are the narrowest target: 80% of packages that go after them take nothing else, though they stayed at 1-4% of packages all year. Theft of npm tokens peaked at 22% of packages in March 2026 and dropped below 5% from May. Classic tokens had been revoked on December 9, 2025, so the later targets were probably granular access tokens and CI secrets.
Droppers aim at Windows, using PowerShell, scheduled tasks and executables. Stealers and backdoors favor Linux through systemd, cron and shell configuration files. About one in eight stealers has macOS-specific code. Also, 38% of packages talk to a legitimate third-party service. Serverless hosting is the most common, with Cloudflare Workers serving several hundred packages. Telegram, Discord and Slack webhooks come next, and a few packages fetch their payload address from a smart contract.

Hijacked packages carry the exposure
Compromised legitimate packages are 7% of the set but over 99% of its download exposure. All ten of the most-downloaded packages in the data are hijacks. 78% of compromised versions added or changed a lifecycle script, against 4% of attacker-created packages. Only 23% showed a change of maintainer or publisher, so most were pushed through the real account with ownership untouched.
Trusted publishing has become a target too. The August wave hit its biggest victims by republishing through OIDC trusted publishing from compromised CI environments, not with stolen tokens. Across the period, 85% of malicious packages published through trusted publishing were compromises. After npm revoked classic tokens and steered maintainers toward trusted publishing, attackers went after the publishing pipeline itself.
Advisories beat takedowns
87% of the set has an OSV advisory. Named worm and dependency-confusion campaigns get advisories the day they publish. Unattributed packages wait a median of 1.7 days, and North Korea-linked ones a median of 4.5 days, with 10% waiting more than two months.
The registry is slower. 40% of attacker-created packages were replaced by npm’s security placeholder, a median of 7.1 days after publication. Another 37% were pulled by their own publishers, at a median of 0.3 days. 16% were still installable at analysis time, including 21% of unattributed packages. Among North Korea-linked packages, npm removed 64% at a median lag of 19.5 days, and 5% remain live. From March 2026 on, the median advisory came before the median takedown in every month.
What comes next
This is the first in a series of supply chain studies from the research team. The next installment will cover emerging threats in the same data that point to npm being used for more than distributing malware. For teams that depend on npm, the findings suggest watching new lifecycle scripts in updates to trusted packages and acting on advisories rather than waiting for registry removal.
Source: Databricks