Press enter or click to view image in full size
While reviewing HackerOne reports on open-source infrastructure, I came across an intriguing submission (#1627159). What caught my attention was a classic yet impactful Regular Expression Denial of Service (ReDoS) vulnerability in Rack. The flaw, tracked as CVE-2022–30122, allowed attackers to slow down or crash servers with specially crafted HTTP requests
Rack provides a minimal, modular interface between web servers and Ruby web frameworks. It is a core component of nearly all Ruby web applications, handling HTTP requests and responses. Popular frameworks like Ruby on Rails, Sinatra and many others depend on Rack for essential functionality, such as parsing incoming data.
The issue stemmed from a Regular Expression Denial of Service (ReDoS) flaw in Rack’s multipart parser, specifically in the constants Rack::Multipart::BROKEN_QUOTED and Rack::Multipart::BROKEN_UNQUOTED.