The video
Patch diffing, the two clocks and the 4 actions in just over three minutes.
What is diffing?
Running a diff means comparing two versions of the same thing to see what changed. You already know the idea:
- the
diffcommand on Linux, which compares two files line by line; - track changes in Word, which shows what was removed and what was added.
Patch diffing applies the same idea to software: you compare the version before the fix (say 10.0.1) with the version after it (10.0.2), to find exactly what the vendor fixed.
Two clocks: zero-day and n-day
You often hear that “the countdown starts when the patch is released”. That is true, but only in one of two cases.
- Zero-day: the attacker finds the flaw before the vendor. No patch exists. The danger started at discovery, long before any fix.
- N-day: the flaw is found by a researcher or the vendor and kept secret until the fix. Almost nobody knows about it. It is the release of the patch that reveals it to the whole world. It is fixed, but not yet installed everywhere.
How patch diffing works
The attacker takes the old compiled file and the new one, then compares them function by function with reverse-engineering tools such as BinDiff, Diaphora or Ghidra.
A concrete example: out of 8,000 functions, 7,997 are identical and 3 have changed. In one of them, the vendor added a single line:
size = read_header(packet);
+ if (size > 512) return ERROR;
copy(buffer, packet, size);
That line says it all: before the fix, nothing checked the size of the data being copied, so a buffer overflow was possible with more than 512 bytes. The patch shows the attacker exactly where to strike on every machine that has not installed it yet.
From weeks to hours
For a long time, this work took an expert days or weeks. That delay gave defenders time to roll out their patches. It is disappearing:
- 2017: WannaCry hit 59 days after Microsoft’s MS17-010 patch.
- 2023: the public Citrix Bleed exploit arrived about 2 weeks after the patch.
- 2026: Anthropic tested its Claude Mythos Preview model with only the information public on patch day. It wrote a working Firefox exploit in under one hour after Mozilla’s fix landed.
- 2026: on 21 Windows kernel flaws, the same model built 8 full privilege-escalation chains to SYSTEM, for about US$2,000 each. A typical fleet takes about 7 days to reach 90% patched: all 8 chains would have been ready first.
Mandiant sees the same trend: in its M-Trends 2026 report, the mean time to exploit is estimated at −7 days, meaning exploitation often happens before the patch is even released.
Why it matters to you
- Hours versus weeks. The exploit can be ready in hours, while your patches still wait for the change board, the maintenance window and the reboot.
- Open-weight models are catching up. This capability will not stay behind gated access for long.
- Hard-to-patch systems become the easiest targets: industrial controllers, medical devices, IoT.
In other words: n-day is becoming n-hour.
What to do: 4 actions
- Patch internet-facing systems first: VPNs, firewalls, web servers. Within hours or days, not at the next monthly window.
- Automate deployment in rings, so a critical fix reaches most of your fleet in days.
- When you can’t patch, compensate: disable the vulnerable feature, filter the traffic, isolate the device.
- Track actively exploited vulnerabilities, such as the CISA Known Exploited Vulnerabilities (KEV) catalog, and treat them as emergencies.
Key takeaways
- Diffing means comparing two versions to see what changed.
- Zero-day: the clock starts at discovery. N-day: it starts at the patch release.
- One added line can reveal the whole flaw.
- AI shrank the window from 59 days (2017) to under one hour (2026).
- The patch is the map. The only question is who reads it faster.
References
- Anthropic — N-days, research on AI-assisted exploitation from patches (2026).
- Mandiant (Google Cloud) — M-Trends 2026.
- Mandiant — time-to-exploit analyses, 2018 to 2023.
- CISA — Known Exploited Vulnerabilities Catalog.
- Microsoft — security bulletin MS17-010 (2017).