5.3medium
Rack ReDos in content type parsing (2nd degree polynomial)
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 35.4% (higher than 98% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-22f2-v57c-j9cx
Description
Rack is a modular Ruby web server interface. Carefully crafted content type headers can cause Rack’s media type parser to take much longer than expected, leading to a possible denial of service vulnerability (ReDos 2nd degree polynomial). This vulnerability is patched in 3.0.9.1 and 2.2.8.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rack rack | >= 3.0.0, < 3.0.9.1, >= 0.4, < 2.2.8.1, from 0.4 before 2.2.8.1, from 3.0.0 before 3.0.9.1 | CVE List, NVD |
| rack_project rack | from 3.0.0 before 3.0.9.1, from 0.4 before 2.2.8.1 | CVE List |
| rack (RubyGems) | from 3.0.0 before 3.0.9.1, from 0.4 before 2.2.8.1 | GitHub Advisory Database |
| debian debian_linux | 10.0 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Rack is a modular Ruby web server interface. Carefully crafted content type headers can cause Rack’s media type parser to take much longer than expected, leading to a possible denial of service vulnerability (ReDos 2nd degree polynomial). This vulnerability is patched in 3.0.9.1 and 2.2.8.1.
GitHub Advisory Database
Summary
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:
request["Content-Type"] = (" " * 50_000) + "a,"
Impact
It's a very easy to craft ReDoS. Like all ReDoS the impact is debatable.
NVD (es)
Rack es una interfaz modular de servidor web Ruby. Los encabezados de tipo de contenido cuidadosamente elaborados pueden hacer que el analizador de tipo de medios de Rack demore mucho más de lo esperado, lo que lleva a una posible vulnerabilidad de denegación de servicio (polinomio de segundo grado de ReDos). Esta vulnerabilidad está parcheada en 3.0.9.1 y 2.2.8.1.
References
| https://github.com/rack/rack/security/advisories/GHSA-22f2-v57c-j9cx | exploit, vendor-advisory, web | |
| https://github.com/rack/rack/commit/6efb2ceea003c4b195815a614e00438cbd543462 | patch, web | |
| https://github.com/rack/rack/commit/d9c163a443b8cadf4711d84bd2c58cb9ef89cf49 | patch, web | |
| https://discuss.rubyonrails.org/t/denial-of-service-vulnerability-in-rack-content-type-parsing/84941 | exploit, vendor-advisory, web | |
| https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2024-25126.yml | exploit, third-party-advisory, web | |
| https://lists.debian.org/debian-lts-announce/2024/04/msg00022.html | mailing-list, web | |
| https://security.netapp.com/advisory/ntap-20240510-0005/ | third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-25126 | advisory | |
| https://github.com/rack/rack | package | |
| https://security.netapp.com/advisory/ntap-20240510-0005 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-25126 changed 2025-02-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-22f2-v57c-j9cx changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-25126 changed 2026-06-17 | Public domain |