logo

CVE-2024-25126 rack

Package

Manager: gem
Name: rack
Vulnerable Version: >=3.0.0 <3.0.9.1 || >=0.4 <2.2.8.1

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

EPSS: 0.00233 pctl0.46046

Details

Rack vulnerable to ReDoS in content type parsing (2nd degree polynomial) ### 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.

Metadata

Created: 2024-02-28T22:57:26Z
Modified: 2024-06-10T18:30:52Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/02/GHSA-22f2-v57c-j9cx/GHSA-22f2-v57c-j9cx.json
CWE IDs: ["CWE-1333"]
Alternative ID: GHSA-22f2-v57c-j9cx
Finding: F211
Auto approve: 1