[CVE-2022-44572] Possible Denial of Service Vulnerability in Rack’s RFC2183 boundary parsing
Rack's multipart boundary parsing could take an unexpected amount of time when given carefully crafted input. An attacker could use this to cause a denial of service against applications that parse multipart posts.
- Triaged in 32 hours
- Fixed in 23 days
- Paid in 23 days
- Disclosed after 53 days
Summary by the program
There is a denial of service vulnerability in the multipart parsing component of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-44572.
Versions Affected: >= 2.0.0
Not affected: None.
Fixed Versions: 2.0.9.2, 2.1.4.2, 2.2.6.1, 3.0.4.1
The report
I reported at https://hackerone.com/reports/1639882
There is a denial of service vulnerability in the multipart parsing component of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-44572. Carefully crafted input can cause RFC2183 multipart boundary parsing in Rack to take an unexpected amount of time, possibly resulting in a denial of service attack vector. Any applications that parse multipart posts using Rack (virtually all Rails applications) are impacted.
Impact
Any applications that parse multipart posts using Rack (virtually all Rails applications) are impacted. This regular expression does not have the effect of ReDoS countermeasures using memoization in Ruby 3.2.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a regular expression in the RFC2183 multipart boundary parsing that can backtrack excessively on crafted input, and which is not protected by Ruby 3.2's ReDoS memoization.
Impact
Applications that parse multipart posts using Rack, which the text says is virtually all Rails applications, could be slowed or made unavailable by crafted requests.
What the attacker needed
Ability to send a multipart POST request
The fix
It was fixed in Rack versions [redacted], [redacted], [redacted] and 3.0.4.1.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A regular expression used to read the boundary between parts of such a form could be made to run slowly by a specially shaped request, possibly causing a denial of service.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.