49 min read

A Patch Goes Public Before the Hole Does

Why public fix commits often precede vulnerability advisories, how patch diffs expose the flaw, and four quantities teams can measure: inventory accuracy, patch velocity, exposure scope, and the patch-to-advisory window.

A Patch Goes Public Before the Hole Does

Introduction

In open-source distribution, the fix usually lands in public before anyone writes the advisory. A 2025 study of 21,501 GitHub-linked CVEs by Liu et al. found that 78% had publicly available patches before official disclosure, with a median of 38 days from fix to disclosure. A vendor study of JavaScript repositories reports a higher commit-first rate (94%) and a shorter median gap (11 days). The two numbers differ because the samples and the clocks differ, not because one is wrong. What they agree on is the ordering: the commit comes first, the advisory comes later.

That ordering matters to any security or platform team whose remediation clock starts when a CVE feed fires. If the fix commit is already public, the advisory is a lagging signal — a description of a hole that was visible in a diff days or weeks earlier. This article explains the mechanism behind that gap, why it is structural rather than a failure by any one maintainer or vendor, and which four quantities a team can measure to see its own position in the pipeline. It closes with an acceptance checklist for reviewing whether a patch program measures its own work or only its assurance artefacts.

The mechanism: a diff is a map

A patch diff compares the pre-fix and post-fix versions of code or a binary. The changed lines localize the vulnerable function; the surrounding context often shows the missing check, the unvalidated input, or the unsafe assumption the fix was written to remove. Reading a diff is therefore a way to find the bug, not merely to confirm that one existed.

Anthropic's n-days research states the point directly: "the patch itself provides a roadmap to the bug," and attackers can patch-diff the pre-patched source or binary against the new one to locate exactly what changed and reverse-engineer the vulnerability. The same page notes that this work was historically slow and specialized, which is what bought defenders time to roll out updates. WannaCry arrived 59 days after MS17-010; the public exploit for Citrix Bleed took about two weeks.

That historical friction is the premise the disclosure model was built on, and it is the premise now under pressure. The mechanism itself is simple: a public commit is a public description of the flaw, written by the people who understood it best.

Why the advisory is not the first signal

The advisory and the commit are different artefacts produced by different processes. An advisory is a curated description published through a coordination process; a commit is an implementation event that lands whenever a maintainer merges it. Nothing in the tooling forces the second to wait for the first.

The ordering is not fixed in either direction. Imtiaz et al. (arXiv 2112.06804) found that across 2,001 advisories, 10.1% were published before the fixed release and 22.4% before the fix was released — advisory first in those cases. Liu et al. observed the opposite skew at scale: 1.04% of CVEs (224 of 21,501) were already fixed before the issue report existed, meaning the fix preceded even the public discussion.

The practical consequence is about scanner timing. Tools keyed to NVD, GitHub Advisory, or OSV fire when the advisory publishes. Their alert time is structurally later than the commit time, by whatever the gap happens to be for that package. A team that treats the alert as the start of its response has already conceded that interval.

Why the window is structural, not one vendor's mistake

The gap is not evidence that someone was careless. It falls out of how remediation and disclosure are divided among roles.

Fix-to-release delay by ecosystem (median days) Horizontal bar chart of median days between a security fix commit and its release: npm 0, Composer 1, NuGet 3, RubyGems 3, Go 6, pip 6, Maven 13. Fix-to-release delay by ecosystem (median days). horizontal bar data: npm 0; Composer 1; NuGet 3; RubyGems 3; Go 6; pip 6; Maven 13.Source: Imtiaz, Khanom, Williams, "Open or Sneaky? Fast or Slow? Light or Heavy?: Investigating Security Releases of Open Source Packages" (arXiv 2112.06804) 2021-12. Fix-to-release delay byecosystem (median days) npm 0 Composer 1 NuGet 3 RubyGems 3 Go 6 pip 6 Maven 13 Source: Imtiaz, Khanom, Williams, "Open or Sneaky?Fast or Slow? Light or Heavy?: InvestigatingSecurity Releases of Open Source Packages" (arXiv2112.06804) (2021-12)

Median days from security fix commit to the release that carries it, by ecosystem. Snyk-sourced advisory dataset (2,001 advisories with fix commits), data as of March 2021; descriptive snapshot, not a census. Overall median 4 days; 25% of releases arrived at least 20 days after the fix.

The CERT/CC Guide to Coordinated Vulnerability Disclosure separates the lifecycle into phases across five roles — finder, reporter, vendor, coordinator, deployer. Remediation is where patches are prepared and advice is developed; public awareness is where advisories are published. These are distinct phases, often performed by different parties on different schedules. A maintainer merging a fix is doing remediation work. Writing the advisory is public-awareness work, and it may involve a coordinator, a CVE assignment, and review by a database that did not write the patch.

Distribution adds a second layer. A fix merged upstream must be released in a version, and that version must propagate to downstream users. Liu et al. note that an attacker could use fix information to discover the vulnerability before the fix reaches production, "especially when not every downstream user updates to the version that includes the fix." The commit-to-advisory window and the release-to-deployment window are separate intervals, and a team can be exposed during either.

Ecosystem conventions widen or narrow the window. Imtiaz et al. report fix-to-release medians ranging from 0 days in npm to 13 days in Maven, and the same dataset shows advisory-before-fix occurrences varying by ecosystem. The width of the gap is a property of the pipeline — release cadence, review queues, backport practice — not a verdict on any single actor. Treating it as a blame question misses the operational point: the gap exists whether or not anyone behaved badly, so the response has to be designed around it.

What a team can actually measure

The following are definitions a team adopts for its own records, not industry standards. Each is stated so it can be computed from data the team already holds or can start collecting.

Most 2023 n-days were exploited within a month of the patch Horizontal bar chart of cumulative shares of 41 observed n-days exploited within one day (12%), one week (29%), one month (56%) and six months (95%) of patch availability. Most 2023 n-days were exploited within a month of the patch. horizontal bar data: Within 1 day 12; Within 1 week 29; Within 1 month 56; Within 6 months 95.Source: Mandiant, "How Low Can You Go? An Analysis of 2023 Time-to-Exploit Trends" 2024-10-15. Most 2023 n-days wereexploited within a month ofthe patch Within 1 day 12 Within 1 week 29 Within 1 month 56 Within 6 months 95 Source: Mandiant, "How Low Can You Go? An Analysisof 2023 Time-to-Exploit Trends" (2024-10-15)

Share of observed n-days exploited within a given interval after a patch became available, 2023 cohort. Based on first-reported exploitation dates; vague dates were assigned the latest plausible date, so true intervals are likely shorter. n = 41 n-days among 138 exploited-in-the-wild vulnerabilities disclosed in 2023 (Mandiant).

Inventory accuracy

The share of production assets for which the team can name the exact component version and its upstream source, measured against a reconciliation sample. Pick a random sample of assets, attempt to identify every component and version, and report the proportion that resolved cleanly along with the sampling method.

Every other metric depends on this one. An exposure count is only as good as the inventory it queries; if the inventory cannot name the version, the count is a guess with a number attached. A team that reports exposure scope without a sampled accuracy figure is reporting the confidence of its inventory, not the extent of its exposure.

Patch velocity

Elapsed time from a defined start event to verified deployment on an asset. The start event must be named explicitly, because the choice changes the number substantially: advisory publication, first observation of the fix commit, and internal discovery are three different clocks, and a velocity figure without a stated clock cannot be compared to anything.

Context for why the clock matters: Mandiant's 2023 time-to-exploit analysis found that of the n-days in its sample, 56% were exploited within one month of a patch being available, and 29% within one week. The sample is the 2023 cohort of 41 n-days, and the authors describe their figures as conservative estimates because they rely on first reported exploitation dates. A team whose velocity clock starts at the advisory is measuring a shorter interval than the one attackers are working against.

Exposure scope

The count and criticality of assets running an affected version at a stated timestamp, with the timestamp and the version-matching rule recorded. The rule matters: whether a range like >=1.2.0, <1.4.3 is evaluated against declared dependencies, lockfiles, or runtime inspection produces different counts.

Scope measured at advisory time understates the population that was exposed during the earlier commit-to-advisory window. If the team wants to know how much exposure it actually carried, it needs a scope figure taken at a timestamp before the advisory, reconstructed from deployment records where possible.

Patch-to-advisory window

The interval between the first public fix commit and the advisory publication for the same issue, measured per CVE and reported as a distribution — median and spread — rather than a single average. A mean over a long-tailed interval tells the reader almost nothing about the typical case.

Published estimates vary widely by sample and clock: 38 days median in Liu et al., 11 days in the Seal Security study, and per-ecosystem fix-to-release medians in Imtiaz et al. that range from 0 to 13 days. These are not competing measurements of the same quantity. A team should measure the window across its own dependency set rather than adopt a headline number, because the number that governs its risk is the one produced by the packages it actually runs.

An acceptance checklist for an evidence-based patch program

Each item below should be answerable yes or no from records, and each ties back to a definition above. The checklist distinguishes a program that measures its own pipeline from one that produces assurance artefacts.

  • Is the start event for patch velocity named and logged? The record should state whether the clock starts at advisory publication, fix-commit observation, or internal discovery, and the same definition should apply across reports.

  • Is inventory accuracy sampled and reported with its method? A percentage without the sample size, selection method, and reconciliation procedure is not a measurement.

  • Is exposure scope recorded with a timestamp and a version-matching rule? A count without either cannot be compared across reports or reconstructed later.

  • Is the patch-to-advisory window measured for the team's own dependency set? Reported as a distribution, not a single average, and covering the packages the team actually runs.

  • Are alerts triggered by fix commits as well as advisories, or only advisories? The answer determines whether the team's detection is structurally later than the commit.

  • Is there a documented path for a fix that appears with no advisory? A named owner, a decision rule, and a record of what was decided — so that the case is handled rather than deferred until a CVE appears.

No item here asserts that a particular tool or vendor satisfies it. The checklist tests the program's own records.

FAQ

Can a patch ship before a CVE is assigned?

Yes. A maintainer can merge and release a fix before any CVE identifier exists. Liu et al. found that 78% of the studied CVEs had public patches before official disclosure, and a separate study of GitHub security advisories (arXiv 2501.17748) found that 68.8% of a sample of 250 advisories without assigned CVEs still contained a patch and an upgrade recommendation. CVE assignment is a cataloguing step, not a precondition for a fix.

Does a patch mean I am safe?

No. Three conditions have to hold, and each can fail independently. The patch must reach the version you actually run — Imtiaz et al. found that 25% of security releases in their dataset came at least 20 days after the corresponding fix, and that some advisories list all versions as vulnerable even when a fixed release exists. The patch must then be deployed on the asset. And the fix may address only part of the issue. A merged commit is the start of remediation, not the end of it.

What should I do when a fix appears without an advisory?

Treat the fix commit as a signal. Check whether your inventory runs the affected component, and decide on deployment using your own exposure and criticality data rather than waiting for a CVE. This depends on the inventory accuracy and commit-monitoring capability described above; no particular feed or product is assumed to provide it.

The tradeoff is real. Commit-level monitoring produces more noise and false positives — the Seal Security study reports that its classifier flagged hundreds of false positives alongside the security fixes it identified — so the triage step has to be staffed and its precision measured, not assumed.

Conclusion

The advisory describes a hole that was already visible in the diff. That is the whole of the argument, and it does not depend on which study supplies the headline number. The ordering holds across samples; only the width of the gap moves.

A patch program that measures its own inventory accuracy, velocity against a named clock, exposure scope at a stated timestamp, and commit-to-advisory window across its own dependencies can act on the earlier signal. One that waits for advisories is measuring its own lag and calling it a remediation timeline.

The next thing to instrument is the commit side of the pipeline: which of your dependencies publish security-relevant fixes, how long their advisories lag, and how much noise a commit-level signal generates for your triage capacity. Those are questions about your dependency set, and only your own records can answer them.

Find out more

https://singdata.com/trending/agent-identity-authorization-behavior-governance-weekly-forecasting/

https://singdata.com/trending/automating-weekly-data-forecasting-pipeline-guide/