WAF regular expression exhausts CPU worldwide for 27 minutes
Jul 2, 13:42 UTCJul 2, 14:09 UTC
Duration
27m
Impact
Critical
Root cause
Deployment
Cloudflare, 90 days
187 incidents
Affected
CDNWAFGlobal
Lesson: Rules and regexes are code; stage them, and use an engine with guaranteed linear time for untrusted input.
What happened
A new WAF rule for XSS detection contained a regular expression with catastrophic backtracking. Deployed globally through an automatic process, it pushed CPU to 100% on every HTTP server and the network dropped traffic for 27 minutes.