CVE-2025-46727
JSON

7.5high

Unbounded-Parameter DoS in Rack::QueryParser

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
1.25% (higher than 70% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-gjh7-p2fx-99vx

Description

Rack is a modular Ruby web server interface. Prior to versions 2.2.14, 3.0.16, and 3.1.14, `Rack::QueryParser` parses query strings and `application/x-www-form-urlencoded` bodies into Ruby data structures without imposing any limit on the number of parameters, allowing attackers to send requests with extremely large numbers of parameters. The vulnerability arises because `Rack::QueryParser` iterates over each `&`-separated key-value pair and adds it to a Hash without enforcing an upper bound on the total number of parameters. This allows an attacker to send a single request containing hundreds of thousands (or more) of parameters, which consumes excessive memory and CPU during parsing. An attacker can trigger denial of service by sending specifically crafted HTTP requests, which can cause memory exhaustion or pin CPU resources, stalling or crashing the Rack server. This results in full service disruption until the affected worker is restarted. Versions 2.2.14, 3.0.16, and 3.1.14 fix the issue. Some other mitigations are available. One may use middleware to enforce a maximum query string size or parameter count, or employ a reverse proxy (such as Nginx) to limit request sizes and reject oversized query strings or bodies. Limiting request body sizes and query string lengths at the web server or CDN level is an effective mitigation.

Affected

Product or packageVersionsReported by
rack rack< 2.2.14, >= 3.0, < 3.0.16, >= 3.1, < 3.1.14, before 2.2.14, from 3.0.0 before 3.0.16, from 3.1.0 before 3.1.14CVE List, NVD
rack (RubyGems)before 2.2.14, from 3.0 before 3.0.16, from 3.1 before 3.1.14GitHub Advisory Database

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-400CWE-770

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Rack is a modular Ruby web server interface. Prior to versions 2.2.14, 3.0.16, and 3.1.14, `Rack::QueryParser` parses query strings and `application/x-www-form-urlencoded` bodies into Ruby data structures without imposing any limit on the number of parameters, allowing attackers to send requests with extremely large numbers of parameters. The vulnerability arises because `Rack::QueryParser` iterates over each `&`-separated key-value pair and adds it to a Hash without enforcing an upper bound on the total number of parameters. This allows an attacker to send a single request containing hundreds of thousands (or more) of parameters, which consumes excessive memory and CPU during parsing. An attacker can trigger denial of service by sending specifically crafted HTTP requests, which can cause memory exhaustion or pin CPU resources, stalling or crashing the Rack server. This results in full service disruption until the affected worker is restarted. Versions 2.2.14, 3.0.16, and 3.1.14 fix the issue. Some other mitigations are available. One may use middleware to enforce a maximum query string size or parameter count, or employ a reverse proxy (such as Nginx) to limit request sizes and reject oversized query strings or bodies. Limiting request body sizes and query string lengths at the web server or CDN level is an effective mitigation.

GitHub Advisory Database

Summary

Rack::QueryParser parses query strings and application/x-www-form-urlencoded bodies into Ruby data structures without imposing any limit on the number of parameters, allowing attackers to send requests with extremely large numbers of parameters.

Details

The vulnerability arises because Rack::QueryParser iterates over each &-separated key-value pair and adds it to a Hash without enforcing an upper bound on the total number of parameters. This allows an attacker to send a single request containing hundreds of thousands (or more) of parameters, which consumes excessive memory and CPU during parsing.

Impact

An attacker can trigger denial of service by sending specifically crafted HTTP requests, which can cause memory exhaustion or pin CPU resources, stalling or crashing the Rack server. This results in full service disruption until the affected worker is restarted.

Mitigation

  • Update to a version of Rack that limits the number of parameters parsed, or
  • Use middleware to enforce a maximum query string size or parameter count, or
  • Employ a reverse proxy (such as Nginx) to limit request sizes and reject oversized query strings or bodies.

Limiting request body sizes and query string lengths at the web server or CDN level is an effective mitigation.

NVD (es)

Rack es una interfaz modular de servidor web Ruby. En versiones anteriores a la 2.2.14, la 3.0.16 y la 3.1.14, `Rack::QueryParser` analiza cadenas de consulta y cuerpos `application/x-www-form-urlencoded` en estructuras de datos Ruby sin imponer ningún límite en el número de parámetros, lo que permite a los atacantes enviar solicitudes con una cantidad extremadamente grande de parámetros. La vulnerabilidad surge porque `Rack::QueryParser` itera sobre cada par clave-valor separado por `&amp;` y lo añade a un hash sin imponer un límite superior en el número total de parámetros. Esto permite a un atacante enviar una sola solicitud con cientos de miles (o más) de parámetros, lo que consume demasiada memoria y CPU durante el análisis. Un atacante puede provocar una denegación de servicio enviando solicitudes HTTP manipuladas específicamente, lo que puede causar el agotamiento de la memoria o la sobrecarga de recursos de la CPU, bloqueando o bloqueando el servidor Rack. Esto provoca una interrupción total del servicio hasta que se reinicia el trabajador afectado. Las versiones 2.2.14, 3.0.16 y 3.1.14 solucionan el problema. Existen otras mitigaciones. Se puede usar middleware para imponer un tamaño máximo de cadena de consulta o un número máximo de parámetros, o emplear un proxy inverso (como Nginx) para limitar el tamaño de las solicitudes y rechazar cadenas o cuerpos de consulta demasiado grandes. Limitar el tamaño del cuerpo de la solicitud y la longitud de las cadenas de consulta a nivel de servidor web o CDN es una mitigación eficaz.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-46727 changed 2025-05-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-gjh7-p2fx-99vx changed 2026-09-10CC-BY-4.0
NVDCVE-2025-46727 changed 2026-06-17Public domain