CVE-2024-25126

MEDIUM5.3EPSS 0.45%

Rack vulnerable to ReDoS in content type parsing (2nd degree polynomial)

發布日:2024/2/28修改日:2026/2/4
也稱為:GHSA-22f2-v57c-j9cxCGA-8j4q-ff96-64p9

描述

### Summary ```ruby module Rack class MediaType SPLIT_PATTERN = %r{\s*[;,]\s*} ``` The above regexp is subject to ReDos. 50K blank characters as a prefix to the header will take over 10s to split. ### PoC A simple HTTP request with lots of blank characters in the content-type header: ```ruby request["Content-Type"] = (" " * 50_000) + "a," ``` ### Impact It's a very easy to craft ReDoS. Like all ReDoS the impact is debatable.

受影響套件(4)

CVSS 分數

來源版本嚴重程度向量
osvCVSS 3.1MEDIUM5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

參考連結(10)