Rack · Rack · CVE-2026-34230
Name of the Vulnerable Software and Affected Versions
Rack versions prior to 2.2.23, 3.1.21, and 3.2.6
Description
Rack::Utils.select best encoding processes `Accept-Encoding` values with quadratic time complexity when the header contains many wildcard (*) entries. Because this method is used by `Rack::Deflater` to choose a response encoding, an unauthenticated attacker can send a single request with a crafted `Accept-Encoding` header and cause disproportionate CPU consumption on the compression middleware path. This results in a denial of service condition for applications using `Rack::Deflater`. The attack does not require invalid HTTP syntax or large payload bodies. A single header-sized request is sufficient to reach the vulnerable code path.
Recommendations
Update to Rack version 2.2.23, 3.1.21, or 3.2.6.