Definition
A minimum release age, also called a dependency cooldown, is a package manager setting that refuses to install a version until it has been public for a set time, for example three days. Hijacked releases are usually found and removed within that time, so the setting keeps most of them out of your installs.
Why waiting works
When an attacker takes over a maintainer account and publishes a malicious version, the first hours are the dangerous ones: the version is the newest, version ranges select it, and no advisory exists. Most such versions are reported and removed within a day or a few days. A project that waits before it accepts new versions never installs them.
The setting in each tool
The unit is different in each tool, which is a common cause of mistakes.
# npm: .npmrc, in days min-release-age=3 # pnpm: pnpm-workspace.yaml, in minutes minimumReleaseAge: 4320 # Bun: bunfig.toml, in seconds [install] minimumReleaseAge = 259200 # uv: pyproject.toml, an ISO 8601 duration [tool.uv] exclude-newer = "P3D"
Yarn 4.10 and later has npmMinimalAgeGate in .yarnrc.yml. pnpm has minimumReleaseAgeExclude for packages that must skip the wait.
Update bots have the same control, so that update pull requests also wait:
# Renovate: renovate.json
{ "minimumReleaseAge": "3 days" }
# Dependabot: .github/dependabot.yml, per update entry
cooldown:
default-days: 3
Limits of a cooldown
- Your tool must support the setting. An older package manager ignores a key it does not know and installs the new version without a warning. Check that your installed version applies it.
- It also delays security fixes. Use the exclude list, or an override, for an urgent patch.
- It does nothing against patient attackers. Malicious code that stays unnoticed for longer than the wait passes: the xz-utils backdoor was prepared over years.
- It does not cover moved tags. A GitHub Action tag that is moved to a malicious commit is not a new release; pin actions to a commit SHA.
A cooldown and source review work together: the cooldown gives time for a malicious release to be found, and a scan of the versions in your lockfile finds the ones that nobody has reported. More in our prevention checklist.
Frequently asked questions
How long should the minimum release age be?
Three to seven days is a common choice. Most hijacked releases are removed within a day or a few days, and a longer wait delays ordinary updates and security fixes.
Does npm support a minimum release age?
Yes, in recent npm versions: set min-release-age in .npmrc, with the value in days. pnpm (minimumReleaseAge, in minutes), Bun (in seconds), Yarn 4.10+ (npmMinimalAgeGate) and uv (exclude-newer) have equivalent settings.
Does a minimum release age delay security patches?
Yes, a patch release is also a new version. Exclude the package from the wait, or pin the fixed version with an override, when you need a fix immediately.