Every CVESearch/Get API key

CVE-2026-142594

Rack: `Rack::Multipart` extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass.

Explain with AI
ChatGPTClaudeGoogle AI
Severity
3.7Low
Network attack, no privileges, no user interactionCVSS 3.1, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.57% in 30 days
Percentile48th
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::Multipart::Parser.parse_boundary locates boundary= as a substring anywhere in a Content-Type header instead of parsing named parameters consistently with Rack::MediaType.params, truncates quoted boundary values at delimiters, preserves surrounding whitespace, and does not correctly process quoted-pair escapes. A conforming intermediary can therefore find no boundary or a different boundary while Rack parses attacker-controlled multipart parts, allowing form fields or uploads to bypass web application firewall inspection. Exploitation requires an intermediary that inspects multipart bodies using a conforming parser, and Rack itself grants no capability beyond a well-formed request carrying the same body. 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
High
Privileges needed
None
User interaction
None

Impact

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

Exploit chance over time

Unchanged since Dec 3, 2026
EPSS score 0.57% 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.0 up to 3.1.24, plus listed versions
3.0.13.0.103.0.113.0.123.0.13
Show 41 more versionsShow less
3.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.0 up to 3.2.9, plus listed versions
3.2.13.2.23.2.33.2.43.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.13.7

Rack: `Rack::Multipart` extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass.

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser.parse_boundary locates boundary= as a substring anywhere in a Content-Type header instead of parsing named parameters consistently with Rack::MediaType.params, truncates quoted boundary values at delimiters, preserves surrounding whitespace, and does not correctly process quoted-pair escapes. A conforming intermediary can therefore find no boundary or a different boundary while Rack parses attacker-controlled multipart parts, allowing form fields or uploads to bypass web application firewall inspection. Exploitation requires an intermediary that inspects multipart bodies using a conforming parser, and Rack itself grants no capability beyond a well-formed request carrying the same body. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
CVE-2026-142594
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-436
Updated
2026-12-05
EUVDEUVD-2026-141929CVSS 3.13.7

Rack: Rack::Multipart extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass

Record
EUVD-2026-141929
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-12-03
GitHub AdvisoriesGHSA-r243-pfwh-7rpxCVSS 3.13.7

Rack: `Rack::Multipart` extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass

Summary

Rack::Multipart::Parser.parse_boundary locates the multipart boundary by matching boundary= anywhere in the Content-Type header with a regular expression, rather than parsing the header's parameters. The matched value is also cut at the first ", ;, or , even inside a quoted-string, and surrounding whitespace is kept. Rack therefore derives a boundary from headers in which a conforming parser (RFC 9110 Section 8.3.1, as implemented by Go's mime.ParseMediaType, Python's email package, and WAF engines built on them) finds a different boundary or none at all. An attacker can choose such a header and lay out a body that an inspecting intermediary and Rack read as different sets of parts.

Details

The boundary is extracted with:

MULTIPART = /\Amultipart\/.*?#{NOT_AFTER_TOKEN_CHAR}boundary(\s*)="?([^";,]+)"?/ni

This has three consequences:

  • boundary= inside another parameter's value is accepted as the boundary. multipart/form-data; name=" boundary=EVIL" and multipart/form-data; x=boundary=AaB03x both yield a boundary for Rack, while a conforming parser finds no boundary parameter. The duplicate-boundary guard added for CVE-2026-125108 counts one occurrence and does not fire, and the token-character lookbehind does not help because a space or = is not a token character.
  • A quoted boundary is truncated at , or ;. multipart/form-data; boundary="AaB03x,1" yields AaB03x for Rack and AaB03x,1 for a conforming parser. This header is fully valid: , is permitted in a boundary by RFC 2046 Section 5.1.1 and inside a quoted-string by RFC 9110, so an intermediary has no reason to reject it.
  • Whitespace after = or before ; becomes part of the boundary, and quoted-pair escapes such as \" are not unescaped.

Rack::MediaType.params(content_type)["boundary"] returns nil for the in-value shapes while parse_boundary returns a value, so Rack's own API is inconsistent with itself.

All supported versions, including 2.2, are affected.

Impact

Applications that accept multipart/form-data behind a web application firewall, reverse proxy, or other component that inspects multipart bodies with a conforming parser. The intermediary sees no multipart body, or a different set of parts, so form fields and file uploads reach the application without inspection. This was confirmed end to end against OWASP Coraza with the OWASP Core Rule Set: a rule that blocks an ordinary PHP file upload does not fire on the smuggled form, while the Rack application receives the file. No authentication, malformed HTTP, or large payload is required. Rack itself grants no capability beyond that of a well-formed request with the same body.

Mitigation

  • Update to a patched version of Rack, in which the boundary is taken only from a parameter named boundary using an RFC 9110 parameter parser, quoted-strings are honoured, and a request with more than one boundary parameter is rejected.
  • At the reverse proxy, reject multipart requests whose Content-Type does not contain exactly one well-formed boundary parameter, and reject boundary values containing , or ;.
Record
GHSA-r243-pfwh-7rpx
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-436
Updated
2026-12-03
NVDCVSS 3.13.7

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser.parse_boundary locates boundary= as a substring anywhere in a Content-Type header instead of parsing named parameters consistently with Rack::MediaType.params, truncates quoted boundary values at delimiters, preserves surrounding whitespace, and does not correctly process quoted-pair escapes. A conforming intermediary can therefore find no boundary or a different boundary while Rack parses attacker-controlled multipart parts, allowing form fields or uploads to bypass web application firewall inspection. Exploitation requires an intermediary that inspects multipart bodies using a conforming parser, and Rack itself grants no capability beyond a well-formed request carrying the same body. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
CVE-2026-142594
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-436
Updated
2026-12-02
OSVCVSS 3.13.7

Rack: `Rack::Multipart` extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass.

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser.parse_boundary locates boundary= as a substring anywhere in a Content-Type header instead of parsing named parameters consistently with Rack::MediaType.params, truncates quoted boundary values at delimiters, preserves surrounding whitespace, and does not correctly process quoted-pair escapes. A conforming intermediary can therefore find no boundary or a different boundary while Rack parses attacker-controlled multipart parts, allowing form fields or uploads to bypass web application firewall inspection. Exploitation requires an intermediary that inspects multipart bodies using a conforming parser, and Rack itself grants no capability beyond a well-formed request carrying the same body. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
CVE-2026-142594
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-436
Updated
2026-12-03
OSVDHI-54yc-sdxg-43sc-6gdjCVSS 3.13.7

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser.parse_boundary…

Rack is a modular Ruby web server interface. Prior to 2.2.26, 3.1.24, and 3.2.9, Rack::Multipart::Parser.parse_boundary locates boundary= as a substring anywhere in a Content-Type header instead of parsing named parameters consistently with Rack::MediaType.params, truncates quoted boundary values at delimiters, preserves surrounding whitespace, and does not correctly process quoted-pair escapes. A conforming intermediary can therefore find no boundary or a different boundary while Rack parses attacker-controlled multipart parts, allowing form fields or uploads to bypass web application firewall inspection. Exploitation requires an intermediary that inspects multipart bodies using a conforming parser, and Rack itself grants no capability beyond a well-formed request carrying the same body. This issue is fixed in versions 2.2.26, 3.1.24, and 3.2.9.

Record
DHI-54yc-sdxg-43sc-6gdj
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-12-04
OSVGHSA-r243-pfwh-7rpxCVSS 3.13.7

Rack: `Rack::Multipart` extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass

Summary

Rack::Multipart::Parser.parse_boundary locates the multipart boundary by matching boundary= anywhere in the Content-Type header with a regular expression, rather than parsing the header's parameters. The matched value is also cut at the first ", ;, or , even inside a quoted-string, and surrounding whitespace is kept. Rack therefore derives a boundary from headers in which a conforming parser (RFC 9110 Section 8.3.1, as implemented by Go's mime.ParseMediaType, Python's email package, and WAF engines built on them) finds a different boundary or none at all. An attacker can choose such a header and lay out a body that an inspecting intermediary and Rack read as different sets of parts.

Details

The boundary is extracted with:

MULTIPART = /\Amultipart\/.*?#{NOT_AFTER_TOKEN_CHAR}boundary(\s*)="?([^";,]+)"?/ni

This has three consequences:

  • boundary= inside another parameter's value is accepted as the boundary. multipart/form-data; name=" boundary=EVIL" and multipart/form-data; x=boundary=AaB03x both yield a boundary for Rack, while a conforming parser finds no boundary parameter. The duplicate-boundary guard added for CVE-2026-125108 counts one occurrence and does not fire, and the token-character lookbehind does not help because a space or = is not a token character.
  • A quoted boundary is truncated at , or ;. multipart/form-data; boundary="AaB03x,1" yields AaB03x for Rack and AaB03x,1 for a conforming parser. This header is fully valid: , is permitted in a boundary by RFC 2046 Section 5.1.1 and inside a quoted-string by RFC 9110, so an intermediary has no reason to reject it.
  • Whitespace after = or before ; becomes part of the boundary, and quoted-pair escapes such as \" are not unescaped.

Rack::MediaType.params(content_type)["boundary"] returns nil for the in-value shapes while parse_boundary returns a value, so Rack's own API is inconsistent with itself.

All supported versions, including 2.2, are affected.

Impact

Applications that accept multipart/form-data behind a web application firewall, reverse proxy, or other component that inspects multipart bodies with a conforming parser. The intermediary sees no multipart body, or a different set of parts, so form fields and file uploads reach the application without inspection. This was confirmed end to end against OWASP Coraza with the OWASP Core Rule Set: a rule that blocks an ordinary PHP file upload does not fire on the smuggled form, while the Rack application receives the file. No authentication, malformed HTTP, or large payload is required. Rack itself grants no capability beyond that of a well-formed request with the same body.

Mitigation

  • Update to a patched version of Rack, in which the boundary is taken only from a parameter named boundary using an RFC 9110 parameter parser, quoted-strings are honoured, and a request with more than one boundary parameter is rejected.
  • At the reverse proxy, reject multipart requests whose Content-Type does not contain exactly one well-formed boundary parameter, and reject boundary values containing , or ;.
Record
GHSA-r243-pfwh-7rpx
CVSS 3.1
3.7 LowCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-436
Updated
2026-12-03

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packages, referencesOSV
Affected packages, other IDs, referencesOSV
Published dateEUVD
Affected packages, referencesOSV
Affected packages, key facts, referencesGitHub Advisories
Other IDs, referencesOSV
Other IDs, published dateEUVD, NVD
First indexedCVE List

Upstream dates may differ.

References

Show 6 more referencesShow less
MoveEnter Open