How One SQL Query Took Down Cloudflare, and What the Year Since Looked Like
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…
On November 18, 2025, Cloudflare experienced a network failure that lasted for about six hours. This was not due to an attack, but rather a routine permissions change that led to a years-old metadata query returning duplicate rows. The query, which returned columns from the 'http_requests_features' table, suddenly returned every feature twice due to the permissions change.
This resulted in a generated file doubling in size, causing a Rust proxy to panic on unwrap(). The incident not only brought down Cloudflare's network for a significant period but also led to a secondary outage seventeen days later through the same path.
The query Cloudflare's Bot Management used to score requests was written in SQL. The query had no filter on the database, which at the time was not an issue as the user running the query could only see one database, 'default'. However, on November 18, Cloudflare deployed a permissions change that made the user's access to the underlying 'r0' database explicit.
This caused the query to return duplicate rows as it now returned features from both 'default' and 'r0' databases. The only change that occurred was the database the query was allowed to see.
The second outage occurred on December 5, 2025, when roughly 28% of Cloudflare's HTTP traffic returned 500 errors. This issue was limited to customers on the older FL proxy who had the Managed Ruleset deployed. The problem stemmed from two changes that went out that morning: a raise in the WAF request-body buffer from 128 KB to 1 MB, and an internal WAF testing tool being switched off during the deployment.
The second change, which went through the global configuration system, hit a rule whose action was 'execute', a situation that had never occurred before. This resulted in a Lua code error due to the assumption that a specific field would always be present.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to