Skip to main content

The Case for a Dependency Cooldown

· 9 min read
Ankush K
Co-founder and CTO, Dwaar
The Case for a Dependency Cooldown

An update bot with no cooldown will open a pull request for a release published minutes ago, and your CI will install it with whatever credentials that job holds. A hijacked maintainer account needs exactly that speed.

The axios postmortem puts the malicious 1.14.1 on npm at 00:21 UTC on March 31, 2026, with both it and 0.30.4 gone by 03:15 UTC (our earlier post covers how). About three hours. A team refusing any version younger than a day would never have resolved either one.

My position: do not adopt a new version of a third-party dependency until it has been public for a while, and make that configuration, not discipline. William Woodruff argued this in November 2025, and GitHub made much the same case in July. The name is a dependency cooldown.

Why the obvious answers fall short​

The obvious advice is to update fast. That advice was built for vulnerable code, where the newest version is the safest one available. A malicious release inverts it, because the newest version is the dangerous one. These are different problems.

The other obvious answer is account security. CISA's alert on the Shai-Hulud npm worm advises phishing-resistant MFA, and it should. But you do not run those accounts, and the axios account had 2FA enabled when a targeted social engineering campaign reached its lead maintainer.

That same alert says to pin to known safe releases produced before September 16, 2025. I read that as an age rule applied after the fact. A cooldown applies it up front.

What the wait buys​

A cooldown detects nothing. It moves your adoption date. It works because the version stays public during the wait, which, in GitHub's words, "gives maintainers, security researchers, and automated scanners time to spot a malicious version."

The most useful public data is Woodruff's table of ten attacks, measured by window of opportunity: the attacker's public release to removal upstream. That is not time to detection, but it is how long the bad version was available.

CooldownWindows it outlastsStill gets through
1 daySeven of ten: Ultralytics (12 hours, then 1 hour), chalk (under 12 hours), Nx (4 hours), rspack (1 hour), num2words (under 12 hours), web3.js (5 hours)tj-actions, Kong Ingress Controller, xz-utils
3 daysThe same seven, with tj-actions (about 3 days) too close to callKong, xz-utils
7 daysEight of ten, adding tj-actionsKong (about 10 days), xz-utils
14 daysNine of ten, adding Kongxz-utils (about 5 weeks)

That is ten incidents on a practitioner's blog, not a rate across all malicious packages. GitHub cites one developer's survey of 21 incidents, which its author says is not a controlled study, in which the malicious axios, Solana web3.js, ua-parser-js and Ledger Connect Kit versions were each pulled within hours. GitHub makes Dependabot and has a stake in that conclusion. Sources disagree on details: chalk is under 12 hours for Woodruff, while GitHub says the September 2025 versions were live roughly two hours. Both are under a day. tj-actions is about 3 days for Woodruff, while NVD lists the tags as affected on March 14 and 15, 2025.

The academic number I can point to looks very different. Ohm et al. collected 174 malicious npm, PyPI and RubyGems packages dating from November 2015 to November 2019, and report that a package was available for 209 days on average before being publicly reported, with a median of 67. But 61% of those packages were typosquats, not hijacked releases of popular projects, the clock stops at the advisory rather than at removal, and the data ends in 2019. I read it as a warning not to stretch this argument to name-squatting malware, which can outlast any wait you would accept. For hijacked releases of popular packages, I have not found an independent, population-level measurement.

My number is seven days. Three is the floor: it has been Dependabot's default since July 14. Seven clears tj-actions on any of these dates, which three may not. Fourteen adds one row for another week behind, so I would save it for major versions.

The settings already exist​

This is what each tool's documentation describes. Check the page for your version before copying anything.

ToolSettingEscape hatch or edge
Dependabotcooldown: default-days, semver-major-daysexclude list, which beats include
pnpmminimumReleaseAge, in minutesminimumReleaseAgeExclude lists package names
npmmin-release-age, in days, since CLI 11.10.0min-release-age-exclude lists package names or globs (since 11.17.0); errors if no eligible version exists
uvexclude-newer, a date or a duration such as 1 weekexclude-newer-package set to false

Bot settings govern what gets proposed, and installer settings govern what gets installed. A Dependabot setting says nothing about a developer's manual install, so use both where you can.

The exception for security patches​

The serious objection is that seven days is a long time to sit on a fix for a public flaw. Correct, and the answer is a separate path, not a shorter cooldown.

Dependabot already draws this line. Its reference says "The cooldown option is only available for version updates, not security updates."

Two gaps remain. A fix for a vulnerability with no published advisory yet is an ordinary version update, so it waits. And at the installer level the exception is yours to build: pnpm, npm and uv all give you per-package exemptions you add by hand. npm errors when nothing is eligible, and since 11.18.0, if the window blocks an npm audit fix patch, it keeps the vulnerable version, warns and exits non-zero. Find out what your emergency path does before you need it.

The rule I would write down: bypass only when an advisory from a database you trust names the version you currently lock. Do not bypass because the new version's release notes say "security fix", since that is what an attacker would write. Remove the exemption once the upgrade lands.

Where this stops working​

CISA names xz-utils 5.6.0 and 5.6.1 as carrying malicious code, and Woodruff measures about five weeks from the first backdoored release. GitHub says a cooldown "does little against attacks that play a longer game", such as dormant backdoors, maintainer sabotage or a compromised build system.

Against a worm like Shai-Hulud, it helps only if each release is removed inside the wait. Nor does it touch a bad version already in your lockfile.

Two questions stay open, and these are my inferences, not measurements. If everyone waits, who finds the bad version? Woodruff's answer is that public indices get scanned regardless, which is plausible and unproven at scale. And once cooldowns are common, patient attackers have a reason to hold a payload past the window.

A cooldown still takes away the cheap, fast, hijacked-account attack and leaves the rest for your other controls.

Try it on one repository​

Pick the repository with the most automated updates and go through the dependency bumps merged in the last month. Compare each version's publish date with your merge date, and count how many went in inside seven days. Then walk your most recent security update through a seven-day rule: which path would it take, and who would approve the bypass? If nobody can answer, write that rule first and set the cooldown second.

References​