CVE-2025-49007: ReDoS Vulnerability in Rack :Multipart Handle_mime_head Vulnerability
MODERATECVE-2025-49007 is a MODERATE :multipart handle_mime_head vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting ReDoS Vulnerability in Rack libraries in the RubyGems ecosystem. The issue involves :multipart handle_mime_head. Remediation is available by upgrading affected packages to version 3.1.16.
CVE-2025-49007 at a Glance
How to Fix CVE-2025-49007
To remediate this vulnerability, upgrade all affected ReDoS Vulnerability in Rack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rack to 3.1.16
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-49007, inspect your project dependencies for ReDoS Vulnerability in Rack:
inspect dependencies for rack
Analyze the terminal output to locate any version of ReDoS Vulnerability in Rack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.16), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In ReDoS Vulnerability in Rack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-49007 Affected ReDoS Vulnerability in Rack Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rack
|
RubyGems |
≥ 3.1.0
< 3.1.16
|
3.1.16
|
References
Frequently Asked Questions
What is CVE-2025-49007?
Which ReDoS Vulnerability in Rack versions are affected?
What version fixes CVE-2025-49007?
Is rack affected?
What CWE is associated with CVE-2025-49007?
How can I check RubyGems dependencies for CVE-2025-49007?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-47m2-26rw-j2jw",
"modified" : "2025-06-05T20:15:06Z",
"published" : "2025-06-05T05:21:34Z",
"aliases" : [ "CVE-2025-49007" ],
"summary" : "ReDoS Vulnerability in Rack::Multipart handle_mime_head",
"details" : "### Summary\nThere is a denial of service vulnerability in the Content-Disposition parsing component of Rack. This is very similar to the previous security issue CVE-2022-44571.\n\n### Details\n\nCarefully crafted input can cause Content-Disposition header parsing in Rack to take an unexpected amount of time, possibly resulting in a denial of service attack vector. This header is used typically used in multipart parsing. Any applications that parse multipart posts using Rack (virtually all Rails applications) are impacted.\n\n### Credits\n\nThanks to [scyoon](https://hackerone.com/scyoon) for reporting this to the Rails security team",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.1.0"
}, {
"fixed" : "3.1.16"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rack/rack/security/advisories/GHSA-47m2-26rw-j2jw"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-49007"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/commit/4795831a0a310c2d31102749e551b38faab6401f"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/commit/aed514df37e33907df3c971ed3ca9a0a20ac2901"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rack/rack"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2025-49007.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-05T05:21:34Z",
"nvd_published_at" : "2025-06-04T23:15:21Z"
}
}