LOWCVSS v3.1 3.7Vulnerability

CVE-2026-142594

## 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: ```ruby 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, includ

Properties

Severity
low
Summary
Rack: `Rack::Multipart` extracts the boundary by substring match rather than parameter parsing, allowing parser differentials and WAF bypass
Nvd fetched at
2026-12-04T15:00:48.841578+00:00
Epss score
0.00568
Cvss severity
LOW
Cvss score
3.7
Retrieved at
2026-12-04T15:02:58+00:00
Ghsa published
2026-12-03T00:08:43Z
Source url
https://github.com/advisories/GHSA-r243-pfwh-7rpx
Ghsa updated
2026-12-03T00:08:44Z
Ghsa id
GHSA-r243-pfwh-7rpx
Last source
FIRST EPSS
Score
3.7
Cvss version
3.1
Cve id
CVE-2026-142594
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
First seen by Signal
2026-12-02T22:45:38+00:00
Name
CVE-2026-142594
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

Related Entities (3)

AFFECTS (1)

→[Software]rubygems/rack

HAS_WEAKNESS (1)

VULNERABLE_TO (1)

←[Software]rubygems/rack

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-142594 (CVSS v3.1 3.7) — Ninja Signal Threat Intelligence | Ninja Signal