Miggo Logo

CVE-2025-59830: Rack has an unsafe default in Rack::QueryParser allows params_limit bypass via semicolon-separated parameters

7.5

CVSS Score
3.1

Basic Information

EPSS Score
-
Published
9/25/2025
Updated
9/25/2025
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
rackrubygems< 2.2.182.2.18

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability exists in how Rack's query parser handles parameter limits. The description and the provided patch clearly indicate that the check_query_string function in lib/rack/query_parser.rb is the source of the vulnerability. The patch modifies this function to correctly count both '&' and ';' as parameter separators when enforcing the params_limit. The previous implementation only counted '&', which allowed an attacker to bypass the limit by using semicolons, potentially leading to a denial of service through resource exhaustion. The functions parse_query and parse_nested_query call check_query_string, making them the entry points for the vulnerable logic, but the root cause is within check_query_string itself.

Vulnerable functions

Rack::QueryParser.check_query_string
lib/rack/query_parser.rb
The vulnerability lies in the `check_query_string` function within the `Rack::QueryParser` class. The original code only counted the ampersand ('&') character to enforce the `params_limit`, but the query parser would split parameters on both ampersands and semicolons (';'). This discrepancy allowed an attacker to bypass the parameter limit by using semicolons as separators, leading to excessive resource consumption. The patch corrects this by counting both '&' and ';' characters.

WAF Protection Rules

WAF Rule

## Summ*ry `R**k::Qu*ryP*rs*r` in v*rsion `< *.*.**` *n*or**s its `p*r*ms_limit` only *or p*r*m*t*rs s*p*r*t** *y `&`, w*il* still splittin* on *ot* `&` *n* `;`. *s * r*sult, *tt**k*rs *oul* us* `;` s*p*r*tors to *yp*ss t** p*r*m*t*r *ount limit *n*

Reasoning

T** vuln*r**ility *xists in *ow R**k's qu*ry p*rs*r **n*l*s p*r*m*t*r limits. T** **s*ription *n* t** provi*** p*t** *l**rly in*i**t* t**t t** `****k_qu*ry_strin*` *un*tion in `li*/r**k/qu*ry_p*rs*r.r*` is t** sour** o* t** vuln*r**ility. T** p*t** m