{"id":"CVE-2025-61919","aliases":["CVE-2025-61919","GHSA-6xw4-3v39-52mm"],"related":[],"kind":"vulnerability","state":"published","title":"Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded body parsing","summary":"Rack is a modular Ruby web server interface. Prior to versions 2.2.20, 3.1.18, and 3.2.3, `Rack::Request#POST` reads the entire request body into memory for `Content-Type: application/x-www-form-urlencoded`, calling `rack.input.read(nil)` without enforcing a length or cap. Large request bodies can therefore be buffered completely into process memory before parsing, leading to denial of service (DoS) through memory exhaustion. Users should upgrade to Rack version 2.2.20, 3.1.18, or 3.2.3, anu of which enforces form parameter limits using `query_parser.bytesize_limit`, preventing unbounded reads of `application/x-www-form-urlencoded` bodies. Additionally, enforce strict maximum body size at the proxy or web server layer (e.g., Nginx `client_max_body_size`, Apache `LimitRequestBody`).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Rack is a modular Ruby web server interface. Prior to versions 2.2.20, 3.1.18, and 3.2.3, `Rack::Request#POST` reads the entire request body into memory for `Content-Type: application/x-www-form-urlencoded`, calling `rack.input.read(nil)` without enforcing a length or cap. Large request bodies can therefore be buffered completely into process memory before parsing, leading to denial of service (DoS) through memory exhaustion. Users should upgrade to Rack version 2.2.20, 3.1.18, or 3.2.3, anu of which enforces form parameter limits using `query_parser.bytesize_limit`, preventing unbounded reads of `application/x-www-form-urlencoded` bodies. Additionally, enforce strict maximum body size at the proxy or web server layer (e.g., Nginx `client_max_body_size`, Apache `LimitRequestBody`).","source":"cvelist"},{"lang":"en","text":"## Summary\n\n`Rack::Request#POST` reads the entire request body into memory for `Content-Type: application/x-www-form-urlencoded`, calling `rack.input.read(nil)` without enforcing a length or cap. Large request bodies can therefore be buffered completely into process memory before parsing, leading to denial of service (DoS) through memory exhaustion.\n\n## Details\n\nWhen handling non-multipart form submissions, Rack’s request parser performs:\n\n```ruby\nform_vars = get_header(RACK_INPUT).read\n```\n\nSince `read` is called with no argument, the entire request body is loaded into a Ruby `String`. This occurs before query parameter parsing or enforcement of any `params_limit`. As a result, Rack applications without an upstream body-size limit can experience unbounded memory allocation proportional to request size.\n\n## Impact\n\nAttackers can send large `application/x-www-form-urlencoded` bodies to consume process memory, causing slowdowns or termination by the operating system (OOM). The effect scales linearly with request size and concurrency. Even with parsing limits configured, the issue occurs *before* those limits are enforced.\n\n## Mitigation\n\n* Update to a patched version of Rack that enforces form parameter limits using `query_parser.bytesize_limit`, preventing unbounded reads of `application/x-www-form-urlencoded` bodies.\n* Enforce strict maximum body size at the proxy or web server layer (e.g., Nginx `client_max_body_size`, Apache `LimitRequestBody`).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Rack es una interfaz modular de servidor web Ruby. Antes de las versiones 2.2.20, 3.1.18 y 3.2.3, 'Rack::Request#POST' lee el cuerpo completo de la solicitud en la memoria para 'Content-Type: application/x-www-form-urlencoded', llamando a 'rack.input.read(nil)' sin aplicar una longitud o límite. Los cuerpos de solicitud grandes pueden, por lo tanto, ser almacenados en búfer completamente en la memoria del proceso antes del análisis, lo que lleva a una denegación de servicio (DoS) por agotamiento de memoria. Los usuarios deben actualizar a la versión de Rack 2.2.20, 3.1.18 o 3.2.3, cualquiera de las cuales aplica límites de parámetros de formulario usando 'query_parser.bytesize_limit', evitando lecturas ilimitadas de cuerpos 'application/x-www-form-urlencoded'. Además, aplique un tamaño máximo estricto del cuerpo en la capa del proxy o del servidor web (por ejemplo, Nginx 'client_max_body_size', Apache 'LimitRequestBody').","source":"nvd"}],"published":"2025-10-10T17:33:35.000Z","modified":"2026-10-19T16:10:00.260Z","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:H","score":7.5,"rating":"HIGH"},"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:H","score":7.5,"rating":"HIGH"},{"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:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"< 2.2.20","status":"affected"},{"version":">= 3.0, < 3.1.18","status":"affected"},{"version":">= 3.2, < 3.2.3","status":"affected"}],"vendor":"rack","product":"rack","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2.20"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0","status":"affected","fixed":"3.1.18"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.3"}],"ecosystem":"RubyGems","package":"rack","purl":"pkg:gem/rack","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.2.20"},{"status":"affected","introduced":"3.0.0","fixed":"3.1.18"},{"status":"affected","introduced":"3.2.0","fixed":"3.2.3"}],"vendor":"rack","product":"rack","cpe":"cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-6xw4-3v39-52mm","tags":["mitigation","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rack/rack/commit/4e2c903991a790ee211a3021808ff4fd6fe82881","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rack/rack/commit/cbd541e8a3d0c5830a3c9a30d3718ce2e124f9db","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rack/rack/commit/e179614c4a653283286f5f046428cbb85f21146f","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61919","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rack/rack","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-61919.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-10T20:48:10.264Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-61919","url":"https://www.cve.org/CVERecord?id=CVE-2025-61919","licence":"CVE Terms of Use","modified":"2025-10-10T20:48:20.240Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6xw4-3v39-52mm","url":"https://github.com/advisories/GHSA-6xw4-3v39-52mm","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:29.392Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-61919","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61919","licence":"Public domain","modified":"2026-10-19T16:10:00.260Z"}],"updatedAt":"2026-11-25T22:59:05.773Z","epss":{"score":0.0068,"percentile":0.53681,"date":"2026-12-01T12:00:22.000Z"}}