{"id":"CVE-2024-25126","aliases":["CVE-2024-25126","GHSA-22f2-v57c-j9cx"],"related":[],"kind":"vulnerability","state":"published","title":"Rack ReDos in content type parsing (2nd degree polynomial)","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n```ruby\nmodule Rack\n  class MediaType\n    SPLIT_PATTERN = %r{\\s*[;,]\\s*}\n```\nThe above regexp is subject to ReDos. 50K blank characters as a prefix to the header will take over 10s to split.\n\n### PoC\n\nA simple HTTP request with lots of blank characters in the content-type header:\n\n```ruby\nrequest[\"Content-Type\"] = (\" \" * 50_000) + \"a,\"\n```\n\n### Impact\n\nIt's a very easy to craft ReDoS. Like all ReDoS the impact is debatable.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-02-28T22:57:26.000Z","modified":"2026-09-10T03:50:05.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":">= 3.0.0, < 3.0.9.1","status":"affected"},{"version":">= 0.4, < 2.2.8.1","status":"affected"}],"vendor":"rack","product":"rack","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"3.0.0","fixed":"3.0.9.1","status":"affected"},{"type":"custom","introduced":"0.4","fixed":"2.2.8.1","status":"affected"}],"vendor":"rack_project","product":"rack","cpe":"cpe:2.3:a:rack_project:rack:3.0.0:rc1:*:*:*:ruby:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"3.0.9.1"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.4","status":"affected","fixed":"2.2.8.1"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.4","fixed":"2.2.8.1"},{"status":"affected","introduced":"3.0.0","fixed":"3.0.9.1"}],"vendor":"rack","product":"rack","cpe":"cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-22f2-v57c-j9cx","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rack/rack/commit/6efb2ceea003c4b195815a614e00438cbd543462","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rack/rack/commit/d9c163a443b8cadf4711d84bd2c58cb9ef89cf49","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://discuss.rubyonrails.org/t/denial-of-service-vulnerability-in-rack-content-type-parsing/84941","tags":["exploit","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2024-25126.yml","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/04/msg00022.html","tags":["mailing-list","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20240510-0005/","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-25126","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rack/rack","tags":["package"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20240510-0005","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-08-12T17:41:06.470Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-25126","url":"https://www.cve.org/CVERecord?id=CVE-2024-25126","licence":"CVE Terms of Use","modified":"2025-02-13T17:40:47.635Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-22f2-v57c-j9cx","url":"https://github.com/advisories/GHSA-22f2-v57c-j9cx","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:05.157Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-25126","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-25126","licence":"Public domain","modified":"2026-06-17T07:15:33.473Z"}],"updatedAt":"2026-11-25T22:58:37.122Z","epss":{"score":0.35376,"percentile":0.98481,"date":"2026-12-01T12:00:22.000Z"}}