All episodes

18:17

7% of Malicious npm Packages Got 99% of the Downloads

Databricks Threat Research studied about 5,400 malicious npm packages from December 2025 to October 2026: "Attacker-created malware packages constitute 89% of the set but 0.2% of its recorded downloads," while the 7% that were hijacked real packages took over 99%. So decide when a new version of a package you already trust reaches your build: commit a lockfile, install with npm ci, and set a release-age cooldown (pnpm 11 defaults to one day; npm's min-release-age is off until set). Also: the NSA tells national security systems to immediately accelerate the move to post-quantum cryptography, so enable hybrid ML-KEM key exchange; give every model call a tested fallback after Konvo AI's Claude dispute; and count Postgres tables, as Pinecone's checkers left millions empty. This show is made with Claude.

7% of Malicious npm Packages Got 99% of the Downloads: episode artwork with Maya and Alex

Hosts Maya and Alex are AI-generated voices and characters. Dorel, a Staff Engineer, creates the show. Sources are linked in every episode.

In this episode

Maya and Alex on Databricks' study of about 5,400 malicious npm packages: the 7% that were hijacked real packages took over 99% of the downloads. Lockfiles, npm ci vs npm install, release-age cooldowns and their cost, what script blocking and provenance miss, and a Monday check. Then the NSA's post-quantum hurry, Konvo AI vs Anthropic (made with Claude; both sides quoted) and Pinecone leaving managed Postgres.

Takeaways

  1. Practice: hijacked real packages were 7% of malicious npm packages and took 99% of downloads. Commit a lockfile, install with npm ci, set a one-day cooldown.
  2. Security, Check this week: enable hybrid ML-KEM key exchange, and start your crypto inventory with what your curves sign, roots included. No government document says P-256 or X25519 is broken.
  3. AI, Check this week: give every model call a tested fallback on another model family, treat policy refusals as non-retryable, and run evals on their own key.
  4. Dev, Watch: Pinecone's health checks left millions of empty Postgres tables. Count tables per database, clean up test resources, alert on transaction ID age.
  5. Review question: which of your builds would install a version published an hour ago, and what secrets would that build hold?

TAKE IT INTO YOUR WEEK

One thing to try.

In every application repository: commit a lockfile and install with npm ci or pnpm install --frozen-lockfile in every CI job and image build; set a release-age cooldown explicitly (npm min-release-age, pnpm minimumReleaseAge) in the package manager and the update bot, and write and rehearse the named-package exception for security fixes; run npm ci --ignore-scripts and npm audit signatures as a baseline. Ask which builds would install a version published an hour ago, and what secrets they hold. This week: turn on TLS 1.3 with hybrid ML-KEM key exchange where supported, then inventory where P-256 and the 25519 curves sign things (internal CA, code and firmware signing, token signing), roots included; set a WireGuard pre-shared key on tunnels with long-lived secrets. Give every model call a tested fallback on a different model family, treat policy refusals as non-retryable, and run evals on their own key. Count Postgres tables per database, make checkers clean up after themselves, and alert on transaction ID age.

Sources

The public sources behind this episode.

Read the timed transcript

00:00:02 — Maya
Seven percent of the malicious npm packages from the past year took more than ninety-nine percent of the downloads. And those seven percent were real packages that someone hijacked.

00:00:13 — Alex
That's from Databricks' threat research team. Welcome to Development Radio. I'm Alex, here with Maya.

00:00:19 — Maya
It's Practice Friday, so dependency pinning comes first. Then the NSA says hurry on post-quantum, a startup says Claude cut it off in its busiest week, and Pinecone leaves managed Postgres.

00:00:32 — Alex
Before any of that. When did you last read a lockfile diff?

00:00:36 — Maya
Read it? I scroll past it. It's the long file in the pull request that nobody expands.

00:00:42 — Alex
Thousands of lines of version numbers and hashes. It looks like noise.

00:00:46 — Maya
Which is sort of the deal. You're meant to be able to trust it without reading it.

00:00:51 — Alex
Most weeks, you can.

00:00:53 — Maya
So that's today's question. If the packages that hurt people are ones they already trust, what in your build decides when a new version gets in? Let's start with that study.

00:01:03 — Alex
Databricks studied about five thousand four hundred malicious npm packages. Most, the attackers created themselves.

00:01:10 — Maya
The lookalikes, I'd guess.

00:01:12 — Alex
Mostly not lookalikes, actually. Just new packages the attackers made. Eighty-nine percent of the set.

00:01:18 — Maya
And the downloads?

00:01:19 — Alex
Two tenths of one percent of the downloads in the study.

00:01:22 — Maya
So the downloads went to the real packages someone hijacked.

00:01:26 — Alex
Seven percent of the set, and over ninety-nine percent of the downloads.

00:01:30 — Maya
Then forget the typos. Which of our builds would install a version published an hour ago?

00:01:35 — Alex
That's the question at the heart of our field guide on dependency pinning. And it changes what you're defending against.

00:01:41 — Maya
Because a typosquat needs me to make a mistake. A hijacked package only needs me to update.

00:01:47 — Alex
Or not even you. Something deep in your tree. On Tuesday, AWS said coding agents now add packages in seconds, faster than a security team can review them.

00:01:58 — Maya
So the thing adding packages isn't always a person any more. Then walk me through it. How does a hijacked version actually get into a build?

00:02:07 — Alex
A worm needs two things from you. A resolver that will pick up a version published minutes ago. And a step that runs the package's code with your credentials in reach.

00:02:17 — Maya
Start with the resolver. When I add a package, npm doesn't save a version. It saves a range.

00:02:23 — Alex
A caret range, by default. It means this version, or anything newer with the same major number.

00:02:30 — Maya
And every package I depend on has its own ranges. So most of what I install is chosen by ranges I never wrote.

00:02:37 — Alex
Which is how chalk and debug spread, in September last year. The maintainer got a two-factor reset email that, in his words, looked shockingly authentic. It came from a lookalike of npm's domain.

00:02:49 — Maya
And that batch of packages had more than two billion downloads a week.

00:02:54 — Alex
So any caret range on them, in your package file or deep in someone else's, would accept the new versions the same day.

00:03:01 — Maya
Which is what the lockfile is for.

00:03:02 — Alex
The lockfile pins the whole tree. Every entry records the exact tarball, and an integrity hash. Commit it, and a reinstall fetches the same bytes, checked against that hash.

00:03:14 — Maya
As long as the install actually reads it. npm install and npm ci treat it differently.

00:03:20 — Alex
npm install uses the lockfile if it still satisfies package dot json. If they conflict, package dot json wins, and npm rewrites the lockfile.

00:03:30 — Maya
And npm ci?

00:03:31 — Alex
Refuses. If the lockfile and package dot json disagree, it exits with an error. It never writes the lockfile at all.

00:03:39 — Maya
So CI runs npm ci. Or with pnpm, install with frozen lockfile.

00:03:45 — Alex
pnpm turns that on by itself when it detects CI. Write the flag out anyway, so a reviewer can see it.

00:03:52 — Maya
Then where doesn't the lockfile help?

00:03:54 — Alex
Every moment you write it. The dependency-update pull request. Someone running npm install to add a package. A lockfile somebody deleted and regenerated.

00:04:05 — Maya
So, every update. Which is exactly when a hijacked version arrives.

00:04:10 — Alex
Which is why the next control exists. A release-age cooldown. The package manager refuses any version younger than a set age, transitive ones included.

00:04:20 — Maya
How young were the bad versions this year?

00:04:22 — Alex
In May, a worm published malicious versions of TanStack's packages. npm removed the last one about four and a half hours after the first went up.

00:04:31 — Maya
And Microsoft's agent framework on PyPI, the one we covered on the twenty-fifth of November. From the first bad upload to the last one quarantined, forty-one minutes.

00:04:41 — Alex
So a one-day cooldown would have skipped both, with hours to spare.

00:04:45 — Maya
Is one day a default anywhere?

00:04:47 — Alex
In pnpm, since version eleven. In npm, it's a setting called min release age, and it's off until you set it.

00:04:55 — Maya
Then I'd put a one-day cooldown on everything. Every repo, every package, no exceptions.

00:05:01 — Alex
Then your security fixes wait a day too. A patch for a bug that's being exploited sits behind the same timer as everything else. Who gets the exception?

00:05:10 — Maya
Whoever writes it down. One named package, one version, in the config, where a reviewer sees it.

00:05:16 — Alex
I'd rather leave the package manager alone, and put the wait in the update bot. Then a person can still ship a fix the same day.

00:05:23 — Maya
A person running npm install in the middle of an incident, or a coding agent adding a package, is exactly the write the lockfile doesn't cover. That's the moment I want the timer.

00:05:34 — Alex
Renovate's own docs back you on that. Set the cooldown in the bot and in the package manager, they say, because a lockfile update can pull in a transitive version the bot never checked.

00:05:44 — Maya
So the cooldown stays everywhere.

00:05:46 — Alex
It stays. But rehearse the exception now. With a cooldown on, npm's audit fix keeps the vulnerable version, warns you, and fails until you exempt the package by name.

00:05:57 — Maya
Which nobody wants to work out at two in the morning.

00:06:00 — Alex
So write it into the runbook, and try it once.

00:06:03 — Maya
Cooldowns and lockfiles decide which version arrives. What about the other half of the worm, the step that runs its code?

00:06:10 — Alex
Install scripts. Most worms run at install, through a hook like post-install. pnpm already blocks dependency install scripts by default, and so does npm twelve.

00:06:20 — Maya
That covers the install hook.

00:06:22 — Alex
Only the hook. In the Databricks set, fifty-four percent of the malicious packages declare a lifecycle script. The rest run when your code imports them, or calls them.

00:06:32 — Maya
So blocking install scripts doesn't even see almost half.

00:06:36 — Alex
And some of the worst ones never needed a script. The chalk and debug code ran in browsers, inside the apps that used it. Microsoft's agent framework ran from a file Python loads every time it starts.

00:06:48 — Maya
Then provenance. Trusted publishing, signed attestations. Doesn't that tell me it's the real package?

00:06:55 — Alex
It tells you which workflow built it. TanStack's malicious versions came through TanStack's own trusted publisher, with valid build attestations. TanStack says no npm tokens were stolen.

00:07:07 — Maya
So the signature was real, and the package was poisoned.

00:07:11 — Alex
npm's docs say it outright: provenance does not guarantee the package has no malicious code. And Databricks found that of the malicious packages that came through trusted publishing, most were hijacked real packages.

00:07:23 — Maya
Their phrase is provenance, not assurance.

00:07:27 — Alex
And none of this catches a slow attack.

00:07:29 — Maya
Like event-stream.

00:07:30 — Alex
Back in twenty eighteen. A new maintainer took over the package, and added a new dependency. That dependency carried the malware.

00:07:38 — Maya
How long until anyone noticed?

00:07:40 — Alex
Seventy-eight days before npm heard about it. No common cooldown is that long. Only someone reading what the lockfile diff added would have caught it.

00:07:49 — Maya
The diff nobody expands.

00:07:51 — Alex
So the check for Monday. First: is a lockfile committed, and does every CI job and image build install with npm ci, or pnpm with frozen lockfile?

00:08:02 — Maya
Second: is a release-age cooldown set explicitly, in the package manager and in the update bot? If npm's config says null, it isn't.

00:08:12 — Alex
Third: install once with scripts turned off, then run npm audit signatures. Treat what it reports as a baseline, not a pass.

00:08:21 — Maya
Then the review question, the whole version. Which of your builds would install a version published an hour ago? And what secrets would that build be holding?

00:08:30 — Alex
If the answer is your release build, with your cloud keys in it, that's your Monday.

00:08:35 — Maya
From packages you already trust, to the maths everybody trusts. Security, and the verdict is check this week. The NSA says hurry.

00:08:44 — Alex
The NSA, CISA and the National Cyber Director's office put out a joint statement this week: American SI companies have disclosed discoveries that impact the security of some cryptography currently in use.

00:08:56 — Maya
S I is super intelligence, meaning AI. Which companies?

00:09:01 — Alex
It doesn't say which, or which cryptography. Their current assessment: not an immediate and widespread threat.

00:09:08 — Maya
And yet the NSA tells national security systems: immediately accelerate. Start with an inventory, signatures included. A forged signature passes off code or a certificate as genuine, and works the day an attack does.

00:09:22 — Alex
On Wednesday we said ML-KEM, the new post-quantum standard, still stands. Still true. Nothing in these documents casts doubt on it; the advice is to move to it. And none of them names a company.

00:09:35 — Maya
So what are people reading into it?

00:09:37 — Alex
We couldn't open the NSA's own pages, so this comes through Filippo Valsorda, the cryptographer, and through VentureBeat, which lists the advisory's steps. An inventory of your cryptography first. Then TLS one point three, with weaker curves stripped out. Then new roots, and re-signed software.

00:09:56 — Maya
Valsorda reads the inventory step as pointing at the two curves almost everyone uses. P-256, and X25519, the one in nearly every TLS handshake today. He thinks they're likely significantly weaker than we thought, and that the worry is a classical attack, not a quantum one.

00:10:15 — Alex
That's a lot to read into an inventory list.

00:10:17 — Maya
Which is why Ryan Hurst reads the same list with less confidence. The NSA's earlier guidance already asked for bigger curves and bigger RSA keys, so he'd expect to see them with or without a new attack. And VentureBeat notes the advisory sets no new deadline.

00:10:34 — Alex
And everyone outside those national security systems is reading between the lines. So does the order of work change?

00:10:41 — Maya
Not much. Valsorda and Hurst both say key exchange first. It's the quick part. The threat there is record now, decrypt later, and hybrid key exchange with ML-KEM closes it today. OpenSSH, most major browsers, and CDNs like Cloudflare already do it.

00:11:00 — Alex
And signatures are the slow part. Roots, code signing, keys baked into firmware. They live for years. And a forged one doesn't wait for anyone to decrypt anything.

00:11:10 — Maya
WireGuard's maintainer, Jason Donenfeld, has begun investigating a WireGuard v2. For now, he points to the pre-shared key slot WireGuard already has, exchanged offline, as a good solution as things stand.

00:11:24 — Alex
So the check this week. Find where those curves, or their signing versions, sign things, not just where they set up keys. Your internal certificate authority, your code and firmware signing, and whatever signs your tokens.

00:11:38 — Maya
Turn on TLS one point three with hybrid key exchange where your stack has it. And put a pre-shared key on WireGuard tunnels that carry long-lived secrets.

00:11:47 — Alex
Hybrid key exchange at the edge can be an afternoon. Re-signing is a year. Do the afternoon, then start the year.

00:11:55 — Maya
From the curves we trust, to a model a company built on. AI next, and the verdict is check this week. A note first: this show is made with Claude, Anthropic's model, so weigh our take with that in mind. We'll give both sides in their own words.

00:12:10 — Alex
A small e-commerce support startup, Konvo AI, builds a support agent for online stores. In the week after Black Friday, the main Claude model they build on stopped answering. Every request got the same line back: the model is suspended for this organization.

00:12:27 — Maya
In their busiest week. Did they know why?

00:12:30 — Alex
A week earlier, their inference provider had warned that some traffic looked inconsistent with Anthropic's usage policy. In practice, that meant distillation. Using one model's answers to train another.

00:12:42 — Maya
And what was the traffic?

00:12:43 — Alex
By their account, their test suite. Scripted support conversations, run several times each against the current agent and the changed one, with a model grading the answers.

00:12:53 — Maya
That's an eval suite. And I can see the problem. Near-identical prompts, in bursts, graded by a model. From the outside, that's also the shape of someone copying a model.

00:13:05 — Alex
Anthropic's side of Konvo's story comes from an Anthropic employee on Hacker News. Quote: this account was not suspended.

00:13:13 — Maya
Then what was it?

00:13:14 — Alex
He says many of their requests broke the terms and were blocked. And because of the velocity of blocked requests, access to that one model was limited for one hour.

00:13:24 — Maya
One hour, against a company that says the model was simply gone. We can't settle that from here.

00:13:30 — Alex
No. A day earlier, he'd written that he thought there were complications around third-party gateways, and they didn't have the full picture.

00:13:38 — Maya
The startup went through several routers and inference providers. That's a lot of gateways for anyone to untangle.

00:13:44 — Alex
And by his account, the trigger was the rate of blocked requests. He suggested watching for blocks, not repeatedly hitting them.

00:13:52 — Maya
A refusal isn't a rate limit. Retrying it is just asking the same question, louder.

00:13:58 — Alex
What did work was their fallback, on a different model family. When Claude stopped answering, those calls moved to OpenAI's GPT models by themselves. Their words: without anyone getting paged.

00:14:11 — Maya
Then they pinned the affected parts of their system to an older Claude model that still works for them. That's our practice again. A pinned version, for a model.

00:14:20 — Alex
So the check this week. Does every model call have a fallback on another model family, and has it actually fired in a test?

00:14:28 — Maya
Does your client treat a policy refusal as final, not something to retry? And do your evals run on their own key, away from production?

00:14:37 — Alex
By their account, it was their test suite that got flagged.

00:14:40 — Maya
And the fallback was so good, nobody got paged.

00:14:44 — Alex
Software development, and the verdict is watch. Pinecone, the vector database company, has taken managed Postgres out of its data plane.

00:14:53 — Maya
All of it?

00:14:54 — Alex
About seventy-seven managed Postgres databases, across AWS, Google Cloud and Azure. Pinecone says the last one was deleted at the end of September.

00:15:04 — Maya
At Pinecone, internal health checkers created a new index every five seconds.

00:15:10 — Alex
And in that design, every index got its own set of Postgres tables.

00:15:14 — Maya
And a bug meant nobody cleaned them up. In Pinecone's words: millions of empty, garbage tables.

00:15:21 — Alex
In 2024, AWS warned one database was near transaction ID wraparound. To prevent that, vacuum must freeze every table.

00:15:30 — Maya
Millions of them. How long did that take?

00:15:33 — Alex
Manual vacuums. More than forty hours.

00:15:37 — Maya
A health check. The one piece of code whose job is making sure nothing's wrong.

00:15:42 — Alex
For anyone who hasn't met wraparound: every Postgres transaction that writes takes an ID from a counter that wraps around. Before it gets halfway round, vacuum has to freeze every table, marking its old rows safe. Fall too far behind, and Postgres stops handing out IDs. No more writes.

00:16:00 — Maya
So is the lesson, don't use Postgres?

00:16:03 — Alex
The post says the opposite. In Pinecone's words, Postgres is great. It just wasn't a good fit as their metadata store. And the worst of it, they say, was on them: tables per index, plus a health check that never cleaned up after itself.

00:16:17 — Maya
Where did the data go?

00:16:19 — Alex
The map of where each vector is stored, and the write-ahead log metadata, went to object storage. System and control data went to FoundationDB, which they run themselves. Pinecone says it now pays about twenty times less for everything those Postgres databases held.

00:16:34 — Maya
How do you move live metadata without stopping writes?

00:16:38 — Alex
Their rule: in any phase, a write goes to exactly one database, and reads can fall back to the other.

00:16:44 — Maya
So no dual writes. At any moment, only one copy is taking writes.

00:16:49 — Alex
And they modelled the switch in TLA plus, a language for checking designs before you build them. It found a bug in their runbook.

00:16:56 — Maya
The check, then. Count the tables in your Postgres databases. Does anything create one per tenant, per index, or per test run?

00:17:04 — Alex
Do your health checks create real resources, and do they delete them? And alert on transaction ID age long before your provider has to warn you.

00:17:13 — Maya
Postgres is great, they say. The trouble was tables per index, and a checker that never cleaned up.

00:17:19 — Alex
One per part. Dependency pinning: commit the lockfile, install with npm ci, and set a one-day cooldown.

00:17:27 — Maya
The NSA: check this week. Turn on hybrid key exchange where you can, and inventory what your curves sign, roots included.

00:17:35 — Alex
Konvo and Anthropic: check this week. Test a cross-family fallback, and stop retrying refusals.

00:17:42 — Maya
Pinecone: watch. Count your tables.

00:17:45 — Alex
Every story today was something trusted that moved. A package got a new version. A model went away for one company. A health check filled a database.

00:17:54 — Maya
So pin what you can, inventory what you can't, and test the fallback. And a question for the comments: which of your builds would install a version published an hour ago?

00:18:05 — Alex
Monday, the week's news, and a new practice. That's Development Radio.

00:18:09 — Maya
And maybe expand that lockfile diff. Just the once.

Download the transcript