I made a 7-minute video on this outage for my YouTube channel, The Dev Stack. This is the written version, for anyone who prefers to read or wants something to link in a postmortem doc. Every number below comes from Cloudflare's own blog posts, linked at the end.
On November 18, 2025, Cloudflare's network failed to deliver core traffic for about six hours. It was not an attack. A routine permissions change made a years-old metadata query return duplicate rows, a generated file doubled in size, and a Rust proxy panicked on unwrap().
What makes this one worth re-reading a year later is what came after: a second outage seventeen days later through the same kind of path, a company-wide resilience program, and a third outage caused by that program's own work.
1. The query
Cloudflare's Bot Management scores requests with a machine-learning model. The model reads a "feature file" that lists the features it scores. A pipeline rebuilds that file every few minutes and pushes it to the whole fleet.
The file is built from ClickHouse's own metadata. The query, from the postmortem:
SELECT name, type FROM system.columns WHERE table = 'http_requests_features' ORDER BY name;
Look at what is missing: there is no filter on the database.
For years that didn't matter. The user running the query could only see one database, default, so the query returned exactly one set of columns.
At 11:05 UTC that day, Cloudflare deployed a permissions change in ClickHouse. It made that user's access to the underlying r0 database explicit. r0 has a table with the same name. The query, unchanged, now returned every feature twice.
Same SQL, same cluster, same table, different answer. The only thing that changed was what the database let the query see.
2. The limit and the panic
A normal feature file had about 60 features. The new one had more than 200.
The newer proxy, FL2, is written in Rust. For performance it preallocates memory for the feature list, with a hard limit of 200. The oversized file went past that limit. Loading it returned an error, and the code called unwrap() on that result:
thread fl2_worker_thread panicked: called `Result::unwrap()` on an `Err` value
Every proxy that loaded the new file panicked the same way, and requests through it got HTTP 5xx. Customers still on the older proxy (FL) didn't get errors. Instead every request got a bot score of zero, so anyone with a rule blocking low scores started blocking real users.
3. Why it looked like an attack
This is the part I find most useful as an on-call lesson.
ClickHouse is distributed, and the permissions change was rolling out node by node. Nodes that had the change produced the bad file. Nodes that didn't still produced a good one. Every five minutes the pipeline picked up whichever file was newest.
So the fleet kept flipping. Bad file, outage. Good file, recovery. Bad file again. From the outside it looked like someone was switching the network on and off, which is what a large DDoS can look like. Cloudflare's status page, hosted entirely outside Cloudflare's infrastructure, also went down by coincidence during the incident, which made the attack theory look even more likely.
The timeline from the postmortem:
- 11:05 permissions change deployed
- 13:37 the bad feature file identified as the cause
- 14:24 generation and propagation of the bad file stopped
- 14:30 core traffic largely flowing again
- 17:06 everything resolved
Two and a half hours to find the cause, mostly because the failure kept healing itself.
4. Two separate failures
I think it's worth naming these separately, because they have different fixes.
The query had a hidden input. Its result depended on the permissions of the user running it, and nobody would see that by reading it. A code review of that SELECT on the day it was written would have passed it. Any query that reads system metadata (system.columns, information_schema, pg_catalog) should filter on database and schema explicitly, even if the current user can only see one. Today's permissions are not a guarantee about tomorrow's.
The proxy trusted a file it generated itself. The unwrap() was there because the file was Cloudflare-made, so of course it would be well-formed. Most teams draw the trust boundary between user input and our own data. The more useful line is between data checked at build time and data produced at runtime. The feature file was produced at runtime by a pipeline, so it needed the same treatment as a request body from the internet: a size check, a schema check, and a fallback to the last good version instead of a crash.
Cloudflare's own first follow-up item was to treat its generated configuration files like user input. That is the same lesson.
5. December 5: same pipe, different bug
Seventeen days later, for about 25 minutes (08:47 to 09:12 UTC), roughly 28% of the HTTP traffic Cloudflare serves returned 500 errors. Only customers on the older FL proxy who had the Managed Ruleset deployed were affected.
Two changes went out that morning:
- The WAF request-body buffer was raised from 128 KB to 1 MB, to protect against a React Server Components vulnerability. This went through the gradual deployment system.
- During that rollout, an internal WAF testing tool turned out not to support the bigger buffer, so it was switched off. That second change went through the global configuration system, which reaches the whole fleet in seconds.
The killswitch hit a rule whose action was execute, which had never happened before. Older Lua code assumed a field would be present:
init.lua:314: attempt to index field 'execute' (a nil value)
A different bug in a different language, but the same shape: a change that skipped the staged rollout, and code that assumed its input would always look a certain way.
6. Code Orange, and the outage the fix caused
On December 19, 2025, Cloudflare announced "Code Orange: Fail Small". It had three workstreams: put configuration changes through the same staged, health-checked rollout as code; review how every traffic-handling system fails; and fix break-glass access for emergencies.
On February 20, 2026, while that work was in progress, Cloudflare had a third major outage. A task from the first workstream automated a manual cleanup of customer IP prefixes (BYOIP). The cleanup called an API with an empty parameter. The API read "empty" as "all", and the automation withdrew about 1,100 of 4,306 BYOIP prefixes before an engineer stopped it. Recovery took about six hours. Cloudflare's postmortem noted that the snapshot rollback that would have made it near-instant was not in production yet.
On May 1, 2026, Cloudflare said Code Orange was complete. It shipped a component called Snapstone that gives configuration and data files the same health-gated rollout as code, plus fail-stale, fail-open and fail-close behaviour decided per system, and backup authorization paths for 18 key services. Its new engineering codex includes one rule that reads like a direct answer to November: don't use unwrap() outside of tests and build.rs. Cloudflare says this work would have prevented both the November 18 and December 5 outages.
7. What I'd check in my own systems
The fix shipped. The pattern behind it is still everywhere: shared state that reaches every node at once, and code that trusts it because "we made it". A few questions worth asking about your own stack:
-
Which of your queries read system metadata without a database or schema filter?
grepforinformation_schema,system.columns,pg_catalog. - Which files does your service load at runtime that a pipeline generates? Feature files, routing tables, allowlists, model weights. Does each one have a size cap and a schema check at load time?
- What happens when that check fails? Crash, or keep serving the last good version? "Fail stale" is usually the right default for config.
- Which config changes skip your staged rollout? Killswitches and global flags are often the fastest path to the whole fleet, and the least tested.
- Where does
unwrap()(or its equivalent in your language) sit on a path that handles live traffic?
None of these would be caught by reviewing the line that changed. Cloudflare's permissions change was correct, and the query was correct when it was written. The outage happened between them.
Sources
All from Cloudflare's own blog:
- Cloudflare outage on November 18, 2025
- Cloudflare outage on December 5, 2025
- Code Orange: Fail Small (December 19, 2025)
- Cloudflare outage on February 20, 2026
- Code Orange: Fail Small is complete (May 1, 2026)
The video walks through all of this as one live diagram of the pipeline, if you'd rather watch it: How One Query Doubled a File and Broke Cloudflare.
Top comments (0)