Every CVESearch/Get API key

CVE-2026-142591

Rack: `Rack::QueryParser` separator pattern allocates ~48 bytes per space after `&`, allowing denial of service via memory amplification.

Explain with AI
ChatGPTClaudeGoogle AI
Severity
5.3Medium
Network attack, no privileges, no user interactionCVSS 3.1, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.61% in 30 days
Percentile50th
EPSS, scored
Listed fix
2.2.26 for rack
From GitHub Advisories and OSV2 more listed versions, 7 other affected packages

Overview

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regular expression engine to allocate approximately 48 bytes of backtracking state per input character. RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the request size but not this amplification, and RACK_QUERY_PARSER_PARAMS_LIMIT does not prevent it because very few parameters are required. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

CVSS 3.1 vector

Exploitability

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

Impact

Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Exploit chance over time

Unchanged since Dec 3, 2026
EPSS score 0.61% every day from Dec 3, 2026 to Dec 4, 2026.

Affected

Packages 8

Affected packages
PackageAffectedFixed
rack
RubyGems
before 2.2.26, plus listed versions
0.1.00.2.00.3.00.4.00.9.0
Show 45 more versionsShow less
0.9.11.0.01.0.11.1.01.1.11.1.1.pre1.1.21.1.31.1.41.1.51.1.61.2.01.2.11.2.21.2.31.2.41.2.51.2.61.2.71.2.81.3.01.3.0.beta1.3.0.beta21.3.11.3.101.3.21.3.31.3.41.3.51.3.61.3.71.3.81.3.91.4.01.4.11.4.21.4.31.4.41.4.51.4.61.4.71.5.01.5.0.beta.11.5.0.beta.21.5.1
2.2.26
3.0 up to 3.1.24, plus listed versions
3.0.03.0.13.0.103.0.113.0.12
Show 42 more versionsShow less
3.0.133.0.143.0.153.0.163.0.173.0.183.0.23.0.33.0.43.0.4.13.0.4.23.0.53.0.63.0.6.13.0.73.0.83.0.93.0.9.13.1.03.1.13.1.103.1.113.1.123.1.133.1.143.1.153.1.163.1.173.1.183.1.193.1.23.1.203.1.213.1.223.1.233.1.33.1.43.1.53.1.63.1.73.1.83.1.9
3.1.24
3.2 up to 3.2.9, plus listed versions
3.2.03.2.13.2.23.2.33.2.4
Show 4 more versionsShow less
3.2.53.2.63.2.73.2.8
3.2.9
gitlab-rails-18
Docker Hardened Images:Alpine:3.23
18.11.11-r0 and later, plus listed versions
18.11.11-r118.11.11-r218.11.12-r018.11.12-r118.11.12-r2
Show 24 more versionsShow less
18.11.12-r318.11.12-r418.11.14-r018.11.14-r118.11.14-r1018.11.14-r1118.11.14-r1218.11.14-r1318.11.14-r1418.11.14-r1518.11.14-r1618.11.14-r218.11.14-r318.11.14-r418.11.14-r518.11.14-r618.11.14-r718.11.14-r818.11.14-r918.11.15-r018.11.15-r118.11.15-r218.11.15-r318.11.15-r4
None listed
gitlab-rails-18
Docker Hardened Images:Alpine:3.24
18.11.11-r0 and later, plus listed versions
18.11.11-r118.11.11-r218.11.12-r018.11.12-r118.11.12-r2
Show 24 more versionsShow less
18.11.12-r318.11.12-r418.11.14-r018.11.14-r118.11.14-r1018.11.14-r1118.11.14-r1218.11.14-r1318.11.14-r1418.11.14-r1518.11.14-r1618.11.14-r218.11.14-r318.11.14-r418.11.14-r518.11.14-r618.11.14-r718.11.14-r818.11.14-r918.11.15-r018.11.15-r118.11.15-r218.11.15-r318.11.15-r4
None listed
gitlab-rails-19
Docker Hardened Images:Alpine:3.23
19.1.8-r0 and later, plus listed versions
19.1.8-r119.4.1-r019.4.1-r119.4.1-r219.4.1-r3
Show 27 more versionsShow less
19.4.2-r019.5.3-r019.5.3-r119.5.3-r219.5.3-r319.5.3-r419.5.3-r519.5.3-r619.5.3-r719.5.3-r819.5.4-r019.5.4-r119.5.5-r019.5.5-r119.5.5-r219.5.6-r019.5.6-r119.6.0-r019.6.0-r119.6.1-r019.6.1-r119.6.1-r219.6.2-r019.6.2-r119.6.2-r219.6.2-r319.6.2-r4
None listed
gitlab-rails-19
Docker Hardened Images:Alpine:3.24
19.1.8-r0 and later, plus listed versions
19.1.8-r119.4.1-r019.4.1-r119.4.1-r219.4.1-r3
Show 27 more versionsShow less
19.4.2-r019.5.3-r019.5.3-r119.5.3-r219.5.3-r319.5.3-r419.5.3-r519.5.3-r619.5.3-r719.5.3-r819.5.4-r019.5.4-r119.5.5-r019.5.5-r119.5.5-r219.5.6-r019.5.6-r119.6.0-r019.6.0-r119.6.1-r019.6.1-r119.6.1-r219.6.2-r019.6.2-r119.6.2-r219.6.2-r319.6.2-r4
None listed
gitlab-exporter
Docker Hardened Images:Debian:13
16.10.0-1 and later, plus listed versions
16.10.0-1016.10.0-1116.10.0-1216.10.0-1316.10.0-14
Show 45 more versionsShow less
16.10.0-1516.10.0-1616.10.0-1716.10.0-1816.10.0-1916.10.0-216.10.0-2016.10.0-2116.10.0-2216.10.0-2316.10.0-2416.10.0-2516.10.0-2616.10.0-2716.10.0-2816.10.0-2916.10.0-316.10.0-3016.10.0-3116.10.0-3216.10.0-3316.10.0-3416.10.0-3516.10.0-3616.10.0-3716.10.0-3816.10.0-3916.10.0-416.10.0-4016.10.0-4116.10.0-4216.10.0-4316.10.0-4416.10.0-4516.10.0-4616.10.0-4716.10.0-4816.10.0-4916.10.0-516.10.0-5016.10.0-5116.10.0-5216.10.0-616.10.0-716.10.0-8
None listed
gitlab-rails-18
Docker Hardened Images:Debian:13
18.11.11-0 and later, plus listed versions
18.11.11-118.11.11-218.11.12-018.11.12-118.11.12-2
Show 40 more versionsShow less
18.11.14-018.11.14-118.11.14-1018.11.14-1118.11.14-1218.11.14-1318.11.14-1418.11.14-1518.11.14-1618.11.14-1718.11.14-1818.11.14-1918.11.14-218.11.14-2018.11.14-2118.11.14-2218.11.14-2318.11.14-2418.11.14-2518.11.14-2618.11.14-2718.11.14-2818.11.14-2918.11.14-318.11.14-3018.11.14-3118.11.14-3218.11.14-418.11.14-518.11.14-618.11.14-718.11.14-818.11.14-918.11.15-018.11.15-118.11.15-218.11.15-318.11.15-418.11.15-518.11.15-6
None listed
gitlab-rails-19
Docker Hardened Images:Debian:13
19.1.8-0 and later, plus listed versions
19.1.8-119.4.1-019.4.1-119.4.1-219.4.2-0
Show 43 more versionsShow less
19.5.3-019.5.3-119.5.3-219.5.3-319.5.3-419.5.3-519.5.3-619.5.3-719.5.3-819.5.3-919.5.4-019.5.4-119.5.5-019.5.5-119.5.5-1019.5.5-1119.5.5-219.5.5-319.5.5-419.5.5-519.5.5-619.5.5-719.5.5-819.5.5-919.5.6-019.5.6-119.5.6-219.5.6-319.5.6-419.5.6-519.6.0-019.6.0-119.6.0-219.6.1-019.6.1-119.6.1-219.6.2-019.6.2-119.6.2-219.6.2-319.6.2-419.6.2-519.6.2-6
None listed

The JSON record also has 77 more versions.

Products 1

Sources

CVE List Score usedCVSS 3.15.3

Rack: `Rack::QueryParser` separator pattern allocates ~48 bytes per space after `&`, allowing denial of service via memory amplification.

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regular expression engine to allocate approximately 48 bytes of backtracking state per input character. RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the request size but not this amplification, and RACK_QUERY_PARSER_PARAMS_LIMIT does not prevent it because very few parameters are required. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
CVE-2026-142591
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-12-03
EUVDEUVD-2026-141926CVSS 3.15.3

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regular expression engine to allocate approximately 48 bytes of backtracking state per input character. RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the request size but not this amplification, and RACK_QUERY_PARSER_PARAMS_LIMIT does not prevent it because very few parameters are required. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
EUVD-2026-141926
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-12-02
GitHub AdvisoriesGHSA-f7cc-57h7-qrcgCVSS 3.15.3

Rack: `Rack::QueryParser` separator pattern allocates ~48 bytes per space after `&`, allowing denial of service via memory amplification

Summary

Rack::QueryParser splits query strings and application/x-www-form-urlencoded bodies on the regular expression /& */n, which also consumes spaces following each &. Matching a long run of spaces with this pattern makes Ruby's regular expression engine allocate about 48 bytes of backtracking state per space, so an input consisting of & followed by spaces causes the process to allocate roughly 48 times the size of the input. This results in a denial of service condition through memory exhaustion for applications that parse query strings or form bodies.

Details

The separator is defined as:

DEFAULT_SEP = /& */n
COMMON_SEP = { ";" => /; */n, ";," => /[;,] */n, "&" => /& */n }

A body of a=1& followed by 4 MiB of spaces then b=2 is one separator match. The match is linear in time (about 20 ms) but allocates about 186 MB of transient memory on top of the 4 MiB input, a factor of 46–48 that holds from 256 KiB (14 MB) to 16 MiB (770 MB). The memory is released after the match, so the peak is set by concurrency: with the default 4 MiB RACK_QUERY_PARSER_BYTESIZE_LIMIT and Puma's default of five threads, five concurrent requests reach about 1 GB. Applications that raise the limit for large forms scale accordingly; a 30 MiB body allocates about 1.5 GB.

RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the input and therefore the cost per request, but the limit was introduced to cap parsing work at roughly the size of the input, and this multiplies it by about 48. RACK_QUERY_PARSER_PARAMS_LIMIT does not apply, since the input contains only one separator.

The same per-byte cost arises from a second pattern in the parser, without any spaces in the input. When a parameter name uses array syntax, params_hash_has_key? splits the name on /[\[\]]+/; the + quantifier makes a long run of [ or ] characters allocate the same backtracking state. A body of a[][b]=1&a[][ followed by 4 MiB of [ has two parameters, is within the default limits, and allocates about 200 MB while being parsed. Rack 2.2 is additionally affected through normalize_params, where the pattern /\A[\[\]]*([^\[\]]+)\]*/ applied to a long parameter name has the same cost.

All supported versions are affected. The space-consuming separator dates from the first Rack release.

Impact

Any application that reads request.params, request.GET or request.POST is affected in its default configuration. An unauthenticated attacker sending a single urlencoded body or query string consisting mostly of spaces, or mostly of bracket characters in a parameter name, causes the process to allocate about 48 times the request size; several concurrent requests can exceed the memory of a small container and trigger the out-of-memory killer. No authentication is required, since the body is parsed before any session or CSRF check, and the request is well-formed HTTP. Normal clients never send unencoded spaces after &, as browsers encode them as + or %20.

Mitigation

  • Update to a patched version of Rack, in which the separator is matched as a plain string, leading spaces are removed from each pair without a regular expression, and parameter names are split on brackets without a quantified pattern.
  • Lower RACK_QUERY_PARSER_BYTESIZE_LIMIT to the largest form body the application actually needs; the transient allocation is about 48 times that value per concurrent request.
  • At a reverse proxy, reject requests whose query string or urlencoded body contains unencoded space characters.
Record
GHSA-f7cc-57h7-qrcg
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-12-04
NVDCVSS 3.15.3

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regular expression engine to allocate approximately 48 bytes of backtracking state per input character. RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the request size but not this amplification, and RACK_QUERY_PARSER_PARAMS_LIMIT does not prevent it because very few parameters are required. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
CVE-2026-142591
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-12-03
OSVCVSS 3.15.3

Rack: `Rack::QueryParser` separator pattern allocates ~48 bytes per space after `&`, allowing denial of service via memory amplification.

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regular expression engine to allocate approximately 48 bytes of backtracking state per input character. RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the request size but not this amplification, and RACK_QUERY_PARSER_PARAMS_LIMIT does not prevent it because very few parameters are required. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
CVE-2026-142591
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-12-03
OSVDHI-6vpk-bxz6-aisi-w725CVSS 3.15.3

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified…

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::QueryParser uses the quantified DEFAULT_SEP and COMMON_SEP regular expressions when splitting query strings and application/x-www-form-urlencoded bodies, while params_hash_has_key? and the Rack 2.2 normalize_params path use quantified expressions for bracketed parameter names. Long runs of spaces after an ampersand, or long runs of bracket characters in a parameter name, cause Ruby's regular expression engine to allocate approximately 48 bytes of backtracking state per input character. RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the request size but not this amplification, and RACK_QUERY_PARSER_PARAMS_LIMIT does not prevent it because very few parameters are required. An unauthenticated attacker can cause substantial transient memory allocation with one request, and concurrent requests can exhaust process or container memory. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
DHI-6vpk-bxz6-aisi-w725
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Updated
2026-12-04
OSVGHSA-f7cc-57h7-qrcgCVSS 3.15.3

Rack: `Rack::QueryParser` separator pattern allocates ~48 bytes per space after `&`, allowing denial of service via memory amplification

Summary

Rack::QueryParser splits query strings and application/x-www-form-urlencoded bodies on the regular expression /& */n, which also consumes spaces following each &. Matching a long run of spaces with this pattern makes Ruby's regular expression engine allocate about 48 bytes of backtracking state per space, so an input consisting of & followed by spaces causes the process to allocate roughly 48 times the size of the input. This results in a denial of service condition through memory exhaustion for applications that parse query strings or form bodies.

Details

The separator is defined as:

DEFAULT_SEP = /& */n
COMMON_SEP = { ";" => /; */n, ";," => /[;,] */n, "&" => /& */n }

A body of a=1& followed by 4 MiB of spaces then b=2 is one separator match. The match is linear in time (about 20 ms) but allocates about 186 MB of transient memory on top of the 4 MiB input, a factor of 46–48 that holds from 256 KiB (14 MB) to 16 MiB (770 MB). The memory is released after the match, so the peak is set by concurrency: with the default 4 MiB RACK_QUERY_PARSER_BYTESIZE_LIMIT and Puma's default of five threads, five concurrent requests reach about 1 GB. Applications that raise the limit for large forms scale accordingly; a 30 MiB body allocates about 1.5 GB.

RACK_QUERY_PARSER_BYTESIZE_LIMIT bounds the input and therefore the cost per request, but the limit was introduced to cap parsing work at roughly the size of the input, and this multiplies it by about 48. RACK_QUERY_PARSER_PARAMS_LIMIT does not apply, since the input contains only one separator.

The same per-byte cost arises from a second pattern in the parser, without any spaces in the input. When a parameter name uses array syntax, params_hash_has_key? splits the name on /[\[\]]+/; the + quantifier makes a long run of [ or ] characters allocate the same backtracking state. A body of a[][b]=1&a[][ followed by 4 MiB of [ has two parameters, is within the default limits, and allocates about 200 MB while being parsed. Rack 2.2 is additionally affected through normalize_params, where the pattern /\A[\[\]]*([^\[\]]+)\]*/ applied to a long parameter name has the same cost.

All supported versions are affected. The space-consuming separator dates from the first Rack release.

Impact

Any application that reads request.params, request.GET or request.POST is affected in its default configuration. An unauthenticated attacker sending a single urlencoded body or query string consisting mostly of spaces, or mostly of bracket characters in a parameter name, causes the process to allocate about 48 times the request size; several concurrent requests can exceed the memory of a small container and trigger the out-of-memory killer. No authentication is required, since the body is parsed before any session or CSRF check, and the request is well-formed HTTP. Normal clients never send unencoded spaces after &, as browsers encode them as + or %20.

Mitigation

  • Update to a patched version of Rack, in which the separator is matched as a plain string, leading spaces are removed from each pair without a regular expression, and parameter names are split on brackets without a quantified pattern.
  • Lower RACK_QUERY_PARSER_BYTESIZE_LIMIT to the largest form body the application actually needs; the transient allocation is about 48 times that value per concurrent request.
  • At a reverse proxy, reject requests whose query string or urlencoded body contains unencoded space characters.
Record
GHSA-f7cc-57h7-qrcg
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness
CWE-400
Updated
2026-12-04

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packages, referencesOSV
Affected packages, other IDs, referencesOSV
Affected packages, referencesOSV
Affected packages, key facts, references
4 sourcesShow lessCVE List, GitHub Advisories, NVD, OSV
Other IDs, referencesOSV
Other IDs, published dateEUVD, NVD
First indexedCVE List

Upstream dates may differ.

References

Show 6 more referencesShow less
MoveEnter Open