Loading...
Skip to main content

CVE-2024-25126

MEDIUM

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

Published February 28, 2024Updated February 4, 2026Source: osv

Summary

### 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.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update rack to 3.0.9.1 or later
gem install rack -v 3.0.9.1
Bundler
Update rack to 2.2.8.1 or later
gem install rack -v 2.2.8.1

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

PackageEcosystemAffectedFixed In
rack
rubygems
3.0.0, 3.0.1, 3.0.2, 3.0.3 (+9 more)3.0.9.1
rack
rubygems
0.4.0, 0.9.0, 0.9.1, 1.0.0 (+101 more)2.2.8.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

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

Frequently Asked Questions

What is CVE-2024-25126?
Rack vulnerable to ReDoS in content type parsing (2nd degree polynomial) This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
How do I check if my project is affected by CVE-2024-25126?
CVE-2024-25126 affects rack. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-25126 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.3

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-22f2-v57c-j9cx

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies