First published: Fri Feb 23 2024(Updated: )
### Summary ```ruby module Rack class MediaType SPLIT_PATTERN = %r{\s*[;,]\s*} ``` The above regexp is subject to ReDos. 50K blank characters as a prefix to the header will take over 10s to split. ### PoC A simple HTTP request with lots of blank characters in the content-type header: ```ruby request["Content-Type"] = (" " * 50_000) + "a," ``` ### Impact It's a very easy to craft ReDoS. Like all ReDoS the impact is debatable.
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
rubygems/rack | >=0.4<2.2.8.1 | 2.2.8.1 |
rubygems/rack | >=3.0.0<3.0.9.1 | 3.0.9.1 |
redhat/rubygem-rack | <3.0.9.1 | 3.0.9.1 |
redhat/rubygem-rack | <2.2.8.1 | 2.2.8.1 |
debian/ruby-rack | 2.1.4-3+deb11u2 2.2.6.4-1+deb12u1 3.0.8-4 | |
Rack | >=0.4<2.2.8.1 | |
Rack | >=3.0.0<3.0.9.1 | |
Debian | =10.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2024-25126 has been classified as a medium severity vulnerability due to its potential to lead to Denial of Service attacks through ReDoS.
To fix CVE-2024-25126, update the 'rack' package to version 2.2.8.1 or 3.0.9.1, depending on your current version.
The vulnerable versions of Rack range from 0.4 up to 2.2.8.1 and from 3.0.0 up to 3.0.9.1.
CVE-2024-25126 enables ReDoS (Regular Expression Denial of Service) attacks, which can significantly delay response times.
Yes, CVE-2024-25126 affects installations of Rack on RubyGems, Red Hat, and Debian packages.