We are sunsetting Hakiri on January 31 2022. To learn more please refer to this document.

rack Severe
Denial of Service
Discovered 5 months ago
Published about 3 years ago
Category: Denial of Service
Severity: Severe

There is a possible DoS vulnerability in the multipart parser in Rack. This vulnerability has been assigned the CVE identifier CVE-2018-16470.

Versions Affected: 2.0.4, 2.0.5 Not affected: <= 2.0.3 Fixed Versions: 2.0.6


There is a possible DoS vulnerability in the multipart parser in Rack. Carefully crafted requests can cause the multipart parser to enter a pathological state, causing the parser to use CPU resources disproportionate to the request size.

Impacted code can look something like this:


But any code that uses the multi-part parser may be vulnerable.

Rack users that have manually adjusted the buffer size in the multipart parser may be vulnerable as well.

All users running an affected release should either upgrade or use one of the workarounds immediately.


The 2.0.6 release is available at the normal locations.


To work around this issue, the following code can be used:

require "rack/multipart/parser"

Rack::Multipart::Parser.send :remove_const, :BUFSIZE
Rack::Multipart::Parser.const_set :BUFSIZE, 16384
CVSS Metrics
Access Vector Access Complexity Authentication Confidentiality Impact Integrity Impact Availability Impact
n/a n/a n/a n/a n/a n/a
Patched Versions

>= 2.0.6

Unaffected Versions

<= 2.0.3