All vulnerabilities

RubyGems

CVE-2026-142590

Rack: `Rack::Multipart::Parser` preserves CRLF from multipart part headers in parsed parameter names (incomplete fix for CVE-2026-26962)

Severity
Medium 4.8
Published
2 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
2.2.26, 3.1.24, 3.2.9
Weakness
CRLF injection (CWE-93)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read some data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Also known as
GHSA-frgv-948x-h96g
Sources
OSV.dev and GitHub

Description

The fix for CVE-2026-26962 was incomplete. Rack::Multipart::Parser can still place a raw carriage return or line feed from a multipart part header into a parameter name in the application's params hash:

  • In Rack 3.1.16+ and 3.2, the parser unfolds folded (obs-fold) Content-Type and Content-Disposition values but not Content-ID. When a part has no usable Content-Disposition header, the part's name is taken from Content-ID, so a folded Content-ID value yields a parameter name containing CRLF.
  • In Rack 2.2, the quoted-string pattern used to extract header parameter values matches across line breaks, so a quoted name or filename containing CRLF is accepted as is, and a bare CR is accepted in a Content-Type value.

In both cases this is the same weakness as CVE-2026-26962, reached through a header or pattern the earlier fix did not cover.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

  • Update to a patched version of Rack. On 3.1 and 3.2 the Content-ID value is unfolded in the same way as Content-Type and Content-Disposition before being used as a part name. On 2.2 the quoted-value and Content-Type patterns no longer match across a line break, matching the behaviour of Rack 3.x.
  • Sanitize or reject carriage return and line feed characters in parameter names and content types before reusing them in response headers, logs, or other protocol contexts.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
rackRubyGems · osv:RubyGems:rack
  • Every version before 2.2.26
  • From 3.1.16 before 3.1.24
  • From 3.2.0 before 3.2.9

About rack

Total downloads (RubyGems)
1,403,480,099RubyGems, 1 Dec 2026

References