How a Single Regex Crashed Cloudflare's Global Network for 27 Minutes in 2019
On July 2, 2019, Cloudflare suffered a 27-minute global outage after a single regular expression drove CPU usage to nearly 100% across every edge server handling HTTP and HTTPS traffic. The culprit was a ReDoS vulnerability caused by nested quantifiers on the same character class, a pattern that forces backtracking regex engines to explore an exponentially growing number of possibilities on near-matching inputs. Just 40 specially crafted characters were enough to pin an entire CPU core, requiring no exploit chain or malicious payload. The flaw passed code review undetected because the regex compiled correctly and performed normally on standard inputs — the vulnerability is structural, not a coding error. DFA-based engines such as RE2, Go's regexp, and Rust's regex crate are immune to this class of bug as they guarantee linear-time matching, unlike Python, JavaScript, and Java engines which rely on backtracking.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in