osec.one DevSecOps cover: a 3-day release cooldown against malicious npm and PyPI releases, 17 of 18

A release cooldown is a rule that your tools don't install a package version until it has been public for some time: one day, three days, a week. The idea is simple. Most malicious releases of popular packages are found and pulled within hours, so if nothing on your side picks up a version in its first few days, you never run the bad one.

We took 18 malicious releases of popular npm and PyPI packages from December 2024 to October 2026, looked up when each one was published (the npm registry's own timestamps, the PyPI audit logs quoted in post-mortems) and when it was removed or replaced by a clean release, and counted how many a 1, 3 and 7-day cooldown would have skipped. Then the settings for Renovate, Dependabot, npm, pnpm, Yarn, Bun, uv and pip, and what a cooldown costs when the new release is the security fix.

Four steps: a malicious version is published; scanners and maintainers flag it within hours; the registry removes it or a clean release replaces it; a 3-day cooldown only ever offers versions that survived that window
Where a cooldown sits: between the publish and your install.

The releases, the windows and the count

"Live for" is publish to removal, or to the first clean release when the removal time wasn't published (marked ≤). Times are UTC. A cooldown counts from each version's own publish time.

PackageMalicious version(s)RegistryPublished (UTC)Gone / clean release (UTC)Live for1 day3 days7 days
@solana/web3.js1.95.6, 1.95.7npm3 Dec 2024 15:101.95.8 at 20:255.3 hyesyesyes
ultralytics8.3.41PyPI4 Dec 2024 20:515 Dec 09:1512.4 hyesyesyes
ultralytics8.3.42PyPI5 Dec 2024 12:4713:471.0 hyesyesyes
ultralytics8.3.45, 8.3.46PyPI7 Dec 2024 01:4110:098.4 hyesyesyes
@rspack/core, @rspack/cli1.1.7npm19 Dec 2024 02:011.1.8 at 06:32≤ 4.5 hyesyesyes
eslint-config-prettier8.10.1, 9.1.1, 10.1.6, 10.1.7npm18 Jul 2025 15:51clean releases 18:40-19:19≤ 3.5 hyesyesyes
is3.3.1, 5.0.0npm19 Jul 2025 11:40clean 3.3.2 at 19:13≤ 7.6 hyesyesyes
nx (s1ngularity)8 versions, 20.9.0-21.8.0npm26 Aug 2025 22:32removed 27 Aug 02:442.1-4.2 h (@nx/key 3.2.0: 11.8 h)yesyesyes
chalk, debug + 16 morechalk 5.6.1, debug 4.4.2 …npm8 Sep 2025 13:12~15:15~2 hyesyesyes
duckdb1.3.3npm9 Sep 2025 01:131.3.4 at 08:077-9 hyesyesyes
@ctrl/tinycolor (Shai-Hulud)4.1.1, 4.1.2npm15 Sep 2025 19:52clean 4.2.0 at 16 Sep 03:17≤ 7.4 hyesyesyes
posthog-js (Shai-Hulud 2.0)1.297.3npm24 Nov 2025 04:09deleted by 09:305.3 hyesyesyes
Shai-Hulud 2.0, the tail~15 versionsnpm24 Nov 2025still on npm 27 Nov 11:00> 80 h (end not published)nonounknown
litellm1.82.7, 1.82.8PyPI24 Mar 2026 10:39quarantined ~11:20 (or 13:38)0.7-3 h (sources differ)yesyesyes
axios1.14.1, 0.30.4npm31 Mar 2026 00:21~03:15-03:29~3 hyesyesyes
@tanstack/* (42 packages)84 versionsnpm11 May 2026 19:20deprecated 21:03, removed by 23:551.7-4.6 hyesyesyes
keyv (ChainDrop)6.0.0npm4 Aug 2026 09:35reverted ~11:151.7 h (other worm versions > 8.5 h)yesyesyes
litellm1.107.0PyPI21 Oct 2026 11:39quarantined 13:201.7 hyesyesyes
torchtriton (reference, 2022)3.0.0PyPI25 Dec 2022dependency removed 30 Dec~120 h (dependency confusion)nonoyes

The count

CooldownSkipped (of 18, Dec 2024 - Oct 2026)Not skipped
none018
1 day (24 h)17Shai-Hulud 2.0 tail (> 80 h)
3 days (72 h)17Shai-Hulud 2.0 tail (> 80 h)
7 days (168 h)17, the 18th unknownnone known; the tail's end was never published

What the numbers say:

• The longest bounded window was 12.4 hours (ultralytics 8.3.41 on PyPI). Anything from 13 hours up would have skipped every one of the 17 with a known end.
• 1 day and 3 days score the same here. The difference is the long tail: a worm like Shai-Hulud 2.0 republishes faster than registries clean up, and about 15 versions were still on npm more than 80 hours in (Wiz, 27 Nov 2025). The ChainDrop worm in August 2026 left versions as latest more than 8.5 hours in.
• The slow-detection case is older: torchtriton, the PyTorch nightly dependency-confusion package, sat on PyPI for about 5 days (25-30 Dec 2022). Only a 7-day cooldown skips it.
• Not counted because no removal time was published: vant (Dec 2024), got-fetch (Jul 2025), num2words (Jul 2025), mistralai 2.4.6 and @opensearch-project/opensearch (May 2026), node-ipc (May 2026).
• 3 days has a second reason: npm allows an unpublish within 72 hours of publishing, so by day 3 a version's owner can no longer silently pull it.

When a cooldown doesn't help

A cooldown only acts when something resolves a version. It changes nothing if:

1. The lockfile already pins the version and installs use npm ci, pnpm install --frozen-lockfile or uv sync --locked. Then the cooldown matters only when the lockfile changes.
2. You were already on the bad version before you added the rule. A cooldown is not a scanner.
3. Code is fetched at runtime: npx pkg, uvx tool, pip install in a Dockerfile without a lock, or a script tag pointing at a CDN with a version range, as in Ledger Connect Kit 2023.
4. The attack is old code. event-stream (2018) and the XZ backdoor (2024) sat in releases for weeks to years; no reasonable cooldown waits that long.

So the cooldown goes in two places: the update bot (which versions it proposes) and the package manager (which versions a fresh resolve may pick).

The settings, tool by tool

Renovate

json
{
  "extends": ["config:best-practices"],
  "packageRules": [
    { "matchDatasources": ["npm", "pypi"], "minimumReleaseAge": "3 days" }
  ],
  "internalChecksFilter": "strict"
}

• minimumReleaseAge defaults to off (null); it used to be called stabilityDays.
• Presets security:minimumReleaseAgeNpm and security:minimumReleaseAgePypi each set 3 days; config:best-practices includes the npm one.
• internalChecksFilter: "strict" (the default) means no branch is created until the age is reached.
• Since Renovate 42 a release without a timestamp is held (minimumReleaseAgeBehaviour: timestamp-required).
• Security updates (vulnerabilityAlerts) bypass the age check by default.
• Not gated: lockFileMaintenance, pin, rollback and replacement updates.

Dependabot

yaml
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
    cooldown:
      default-days: 3
      semver-major-days: 30
      semver-minor-days: 7
      semver-patch-days: 3
      exclude: ["@myorg/*"]

• Since 14 July 2026 version updates on github.com wait 3 days by default (GHES from 3.23). The block above makes it explicit and stricter for majors.
• Values: 1 to 90 days. exclude wins over include; up to 150 entries each.
• The semver settings apply only to SemVer ecosystems; Docker, Actions and Terraform use default-days.
• Security updates ignore the cooldown and open at once.

npm

ini
# .npmrc  (npm 11.10.0 or later)
min-release-age=3
min-release-age-exclude[]=@myorg/*

• Days, default off. Older alternative: --before=2026-10-25 (an absolute date; wins if both are set in the same place).
• npm audit fix refuses a fix that is too new: it keeps the vulnerable version, warns and exits non-zero.

pnpm

yaml
# pnpm-workspace.yaml  (pnpm 10.16+)
minimumReleaseAge: 4320        # minutes = 3 days
minimumReleaseAgeExclude:
  - '@myorg/*'
  - 'next@16.0.7'

• Default is 1440 minutes (1 day) since pnpm 11; 0 before.
• Setting it yourself turns on strict mode (no fallback to a younger version).
• pnpm audit --fix writes minimumReleaseAgeExclude entries for the patched versions.

Yarn (4.x)

yaml
# .yarnrc.yml
npmMinimalAgeGate: 3d
npmPreapprovedPackages:
  - "@myorg/*"

• Added in 4.10.0 (minutes), duration strings like 3d from 4.11.0; default 1d since 4.15.0 (May 2026).

Bun

toml
# bunfig.toml  (Bun 1.3+)
[install]
minimumReleaseAge = 259200     # seconds = 3 days
minimumReleaseAgeExcludes = ["@myorg/sdk"]

• Default off. Versions without a publish time pass the check.

uv

toml
# pyproject.toml  (uv 0.9.17+ for relative durations)
[tool.uv]
exclude-newer = "3 days"
exclude-newer-package = { my-internal-pkg = false }

• Compares against each file's upload time. Default off. Also accepts P3D or a fixed RFC 3339 timestamp.

pip

bash
# pip 26.1+ (durations); 26.0 takes a date
pip install --uploaded-prior-to P3D -r requirements.txt

• From pip 26.2 this is honoured with -r pylock.toml through its upload-time field.

What it costs: the security fix waits too

The bots exempt security updates; the package managers don't. If your repo has both, the Dependabot or Renovate security pull request can still fail when the lockfile is regenerated, because npm, pnpm, Yarn, Bun, uv or pip refuses the fix for being too new.

Worked example, React2Shell (CVE-2025-55182, CVSS 10), from the npm registry:

Fixed releasePublished (UTC)Installable under a 3-day gate
next 16.0.73 Dec 2025 15:166 Dec 15:16
next 15.5.73 Dec 2025 15:266 Dec 15:26
react-server-dom-webpack 19.2.13 Dec 2025 15:286 Dec 15:28
react-server-dom-webpack 19.0.13 Dec 2025 15:336 Dec 15:33

AWS reported China-nexus groups exploiting it within hours of disclosure. Without an exclusion, a 3-day gate keeps a public server unpatched for 72 hours of active exploitation. The fix is a written procedure, not a shorter cooldown:

1. When a critical advisory lands, add the exact fixed version to the exclude list (minimumReleaseAgeExclude, min-release-age-exclude, npmPreapprovedPackages, exclude-newer-package), not the whole package.
2. Pin it exactly in the same pull request, so the exception can't pick up a later, unvetted release.
3. Remove the exclusion once the version is older than the cooldown.

Two more costs, smaller: new features arrive 3 days later (rarely matters), and a monorepo's own packages need excluding or every internal release waits too (use your scope, @myorg/*).

A setup that fits most teams

1. Lockfile committed, frozen installs in CI (npm ci, pnpm install --frozen-lockfile, uv sync --locked).
2. 3-day cooldown in the update bot (Dependabot's default since July 2026, or Renovate's security:minimumReleaseAgeNpm/Pypi presets), security updates exempt.
3. The same 3 days in the package manager, so a developer's npm install new-pkg or an unlocked Docker build can't pick a day-old release.
4. Your own scope excluded.
5. A one-page procedure for critical fixes (exact-version exclusion, removed after 3 days).
6. Runtime fetches pinned: no npx pkg@latest in CI, a checksum on every downloaded install script, exact versions with integrity on CDN script tags.

For the last point: the free osec Pinned download tool hashes an install script or binary URL and gives you the download-verify-run snippet for shell, GitHub Actions, GitLab CI and Dockerfiles, so a curl | sh step stops running whatever the URL serves today. For the pipeline side of the same attacks, see how a poisoned Ultralytics release was built by the project's own workflow, and what npm 12 and the 2026 GitHub Actions changes switch on by default.

Paste the URL of an install script or binary your pipeline downloads and get its SHA-256 plus a download, verify, run snippet for shell, GitHub Actions, GitLab CI or a Dockerfile. Free, no account.

Pin a download

Sources

• npm registry metadata (publish times; removed versions remain in time): https://registry.npmjs.org/<package>, read 28 Oct 2026
• GitHub advisory GHSA-jcxm-7wvp-g6p5 (@solana/web3.js): https://github.com/advisories/GHSA-jcxm-7wvp-g6p5
• Snyk, Ultralytics AI pwn request (PyPI audit log times): https://snyk.io/blog/ultralytics-ai-pwn-request-supply-chain-attack
• Socket, Ultralytics compromised through GitHub Actions cache poisoning: https://socket.dev/blog/ultralytics-pypi-package-compromised-through-github-actions-cache-poisoning
• The Hacker News, rspack packages compromised: https://thehackernews.com/2024/12/rspack-npm-packages-compromised-with.html
• GitHub advisory GHSA-f29h-pxvx-f335 (eslint-config-prettier): https://github.com/advisories/GHSA-f29h-pxvx-f335
• Socket, is package hijacked: https://socket.dev/blog/npm-is-package-hijacked-in-expanding-supply-chain-attack
• Nx advisory GHSA-cxm3-wv7p-598c: https://github.com/nrwl/nx/security/advisories/GHSA-cxm3-wv7p-598c
• Aikido, debug and chalk compromised: https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised ; Wiz: https://www.wiz.io/blog/widespread-npm-supply-chain-attack-breaking-down-impact-scope-across-debug-chalk
• Semgrep, chalk, debug and color compromised (duckdb): https://semgrep.dev/blog/2025/chalk-debug-and-color-on-npm-compromised-in-new-supply-chain-attack
• @ctrl/tinycolor post-mortem: https://sigh.dev/posts/ctrl-tinycolor-post-mortem
• PostHog, Shai-Hulud 2.0 post-mortem: https://posthog.com/blog/nov-24-shai-hulud-attack-post-mortem ; Wiz, Shai-Hulud 2.0: https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack
• LiteLLM security blog (March 2026): https://docs.litellm.ai/blog/tags/security
• Snyk, axios compromised: https://snyk.io/blog/axios-npm-package-compromised-supply-chain-attack-delivers-cross-platform/
• TanStack, npm supply chain compromise post-mortem: https://tanstack.com/blog/npm-supply-chain-compromise-postmortem
• StepSecurity, ChainDrop npm worm: https://stepsecurity.io/blog/chaindrop-npm-worm
• Wiz, litellm 1.107.0 compromised: https://www.wiz.io/blog/litellm-compromised-steals-credentials ; StepSecurity: https://www.stepsecurity.io/blog/litellm-1-107-0-compromised-pypi-backdoored-wheels-credential-stealer
• PyTorch, compromised nightly dependency (torchtriton): https://pytorch.org/blog/compromised-nightly-dependency/
• William Woodruff, We should all be using dependency cooldowns: https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
• Renovate docs, minimumReleaseAge: https://docs.renovatebot.com/key-concepts/minimum-release-age/
• GitHub changelog, Dependabot default package cooldown (14 Jul 2026): https://github.blog/changelog/2026-07-14-dependabot-version-updates-introduce-default-package-cooldown/ ; options reference: https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference
• npm docs, min-release-age: https://docs.npmjs.com/cli/v12/using-npm/config#min-release-age
• pnpm settings, minimumReleaseAge: https://pnpm.io/settings
• Yarn, npmMinimalAgeGate: https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate
• Bun, install.minimumReleaseAge: https://bun.com/docs/runtime/bunfig#install-minimumreleaseage
• uv settings, exclude-newer: https://docs.astral.sh/uv/reference/settings/#exclude-newer
• pip release notes (--uploaded-prior-to): https://pip.pypa.io/en/stable/news/
• AWS, China-nexus groups exploit React2Shell: https://aws.amazon.com/blogs/security/china-nexus-cyber-threat-groups-rapidly-exploit-react2shell-vulnerability-cve-2025-55182