Back to blog
engineering

How long do hacked npm packages stay installable? I checked 48 attacks to pick my release-age gate

By Daniel Chavez

WarpKit won't install any npm package version that's less than 3 days old, and this week that meant five security fixes had to sit and wait. So I asked myself if 3 days is too much, a commercial web app I worked on used 1 day, and I didn't want to pick between them on a feeling, I wanted numbers.

So I went through every npm compromise I could find from 2018 to today, 48 of them, and for each one I looked up when the bad version was published, when someone noticed, and when it stopped being installable.

What is a release-age gate?

It's one line in your package manager config that tells it to ignore any version published in the last N days. In WarpKit it's in bunfig.toml:

[install]
ignoreScripts = true
minimumReleaseAge = 259200 # 3 days, in seconds

pnpm has the same thing as minimumReleaseAge in minutes, and npm added min-release-age in days in 11.10, off by default. The idea is that when someone steals a maintainer's token and publishes a bad version, it usually gets caught and pulled before your install would ever pick it up.

How did I measure it?

The publish time comes from the npm registry itself, because registry.npmjs.org/<package> keeps the time of every version even after it's unpublished, so those are exact. npm doesn't record when a version was removed, so that part comes from postmortems, GitHub issues and advisories, and when nothing better existed I used the last time the package changed as the latest possible removal time.

I counted a version as gone at whichever came first: unpublished, deprecated, or a clean release taking the latest tag. That's generous to the attacker in one way, because an exact pin still installs a deprecated version, so keep that in mind.

How long did the bad versions stay live?

YearIncidentLive forSource
2018eslint-config-eslint36 minutesESLint postmortem
2018eslint-scope1h 57mESLint postmortem
2018conventional-changelogabout 35 hoursissue #282
2018event-stream / flatmap-streamabout 52 daysnpm blog
2018getcookies / mailparserweeksnpm blog
2019electron-native-notifyabout 73 daysnpm blog
2021ua-parser-jsabout 4 hoursGHSA-pjwm-rvh2-c87w
2021coaabout 1 to 3 hoursGHSA-73qr-pfmq-6rp8
2021rcabout 7 hoursGHSA-g2q5-5433-rhrf
2022colors (broken by its maintainer)about 1.2 to 4.2 daysBleepingComputer
2022node-ipc (protestware by its maintainer)15 hours as latest, old versions for daysSnyk
2023Ledger connect-kitabout 5 hoursLedger
2023@0xengine/xmlrpc (the attacker's own package)about 507 daysCheckmarx
2024@lottiefiles/lottie-player2h 47missue #254
2024@solana/web3.js9h 12mAnza
2024rspack1h 21m or lessissue #8767
2024vantabout 1.6 hoursregistry
2025rand-user-agentabout 10.4 daysAikido
2025xrplabout 15h 48mXRPL
2025gluestack / react-native-aria1 to 1.5 days deprecated, about 3.3 days removedBleepingComputer
2025eslint-config-prettierabout 2.5 hours deprecated, up to 59 hours removedissue #339
2025isabout 7.5 hours, up to 35 hours removedStepSecurity
2025Toptal Picassoa few hoursThe Hacker News
2025nx (s1ngularity)4h 12m, the last packages 11h 48mGHSA-cxm3-wv7p-598c
2025chalk, debug and 16 othersabout 6h 47mSnyk
2025duckdbunder 24 hoursGHSA-w62p-hx95-gf2c
2025Shai-Hulud, first waveover 24 hours for the first victimsSocket
2025Shai-Hulud 2about 5.4 to 8.5 hoursAsyncAPI, PostHog
2026axios2h 53mpostmortem
2026Bitwarden CLIabout 2 hoursBitwarden
2026SAP mbtabout 6h 20mSnyk
2026TanStackup to 4h 35mTanStack
2026Mistralabout 3 hoursMistral
2026Red Hatabout 2 hoursHelp Net Security
2026Mastraup to 5h 49mMicrosoft
2026AsyncAPI generatorabout 3 to 4 hoursStepSecurity
2026ChainDrop worm1 to 2 hours for the first packagesDatadog
2026dforge-mcp35 minutesCloudSEK
2026PolinRiderabout 21h 45mSonatype
2026WPPConnectabout 4h 31mStepSecurity
2026indexed-btree (the attacker's own package)about 77 daysCheckmarx

Seven more had no removal time anywhere I could find: Glassworm's React Native packages, UiPath, OpenSearch, node-ipc again in 2026, AntV, jscrambler and openapi-react-query-codegen. In each of those, where we know, someone noticed within minutes to an hour.

So is 1 day enough?

Of the 41 with a known end, 30 were gone within 24 hours, and most of the 2025 and 2026 ones were gone in 2 to 9 hours, because scanners like Socket, Aikido and StepSecurity now flag a hijacked release within minutes. So 1 day covers most of it, but it's close to the edge, PolinRider was live for about 21 hours and xrpl for almost 16.

What 1 day misses is the 4 that lasted between 1 and 3 days: conventional-changelog, gluestack, the first Shai-Hulud wave and colors. Three of those four started between Friday night and Sunday, when fewer people were looking, and that's exactly the kind of thing I don't want to depend on.

Why not 7 days then?

Because past 3 days the data jumps, apart from colors and the final removal of gluestack, everything that lasted longer than 3 days lasted weeks or months: rand-user-agent about 10 days, event-stream about 52, electron-native-notify about 73, and the attacker's own packages a year or more. Those were quiet on purpose, hidden in a dependency, aimed at one app or one country, or published by the attacker from day one, so a 7-day gate doesn't catch them either.

And a longer gate holds back the fixes too. WarpKit used to wait 7 days, and in October that would have kept the TanStack Start XSS fix (CVE-2026-102989) out for a week, so I lowered it to 3 on October 1.

What did I keep?

I kept 3 days, because it covers every case in this list that was caught in under 72 hours, weekends included, and going to 7 would only add one or two edge cases while delaying every real fix by four more days. WarpKit also has ignoreScripts = true, and 24 of the 48 ran their payload from an install script, so that setting alone would have stopped about half of them, but none of the 7 that lasted longer than 3 days used one, and in 2026 several attackers moved to code that runs on import on purpose to get around it, so I keep both.

WarpKit has no exclude list at all, not even for my own packages, because an exclude skips the gate for every future version of that package, and a stolen token for one of my packages would hurt just as much. When a fix really can't wait, or I need a version of my own package right after publishing it, I check that the release was published from the project's CI with provenance, then install once with the gate lowered on the command line to just under the age of that fix, and bunfig.toml stays at 3 days.

What doesn't the gate catch?

Only the attacks somebody found are in this list, and an attack nobody has found yet would be a long one by definition. The gate also does nothing for a bad version that's already in your lockfile, or one that sat quietly for weeks before it fired, so I see it as one layer, next to ignoreScripts and actually reading git diff bun.lock before I commit.

The full research, with every timestamp and how sure each one is, is what I used to make this decision for WarpKit, and the story of why I asked the question in the first place is on my own site.