本文へ移動
English version →
中 4.8

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

CVE-2026-142590 SecPulse初出

影響パッケージ

パッケージ影響を受ける版 → 修正版
rackrack —
rubygemsrack
3.2.0 以上 3.2.9 未満→ 3.2.9
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

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.

Details

Rack 3.1.16 and later, Rack 3.2

The fix for CVE-2026-26962 added an OBS_UNFOLD substitution and applied it to the Content-Type and Content-Disposition values. The fallback branch that derives the part name from Content-ID was left unchanged:

content_type = head[MULTIPART_CONTENT_TYPE, 1]
content_type.gsub!(OBS_UNFOLD, '\1') if content_type

if (disposition = head[MULTIPART_CONTENT_DISPOSITION, 1]) && disposition.bytesize <= CONTENT_DISPOSITION_MAX_BYTES
  disposition.gsub!(OBS_UNFOLD, '\1')
  # ...
else
  name = head[MULTIPART_CONTENT_ID, 1]   # not unfolded
end

A part con…

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく