Skip to content
DoS Disclosed report Intermediate CVE-2022-44570

[CVE-2022-44570] Possible Denial of Service Vulnerability in Rack’s Range header parsing

Rack's Range header parsing used a regular expression vulnerable to catastrophic backtracking, so crafted Range header values could make the parser take an unexpected amount of time. An unauthenticated attacker could send such requests to cause a denial of service, especially on servers serving files or streaming content.

ooooooo_q Follow

Originally disclosed on HackerOne

Bounty$480 Low View original
  • Triaged in 33 hours
  • Fixed in 23 days
  • Paid in 23 days
  • Disclosed after 53 days

Summary by the program

There is a possible denial of service vulnerability in the Range header parsing component of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-44570.

Versions Affected: >= 1.5.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 made a report and patch at https://hackerone.com/reports/1668717.

https://discuss.rubyonrails.org/t/cve-2022-44570-possible-denial-of-service-vulnerability-in-racks-range-header-parsing/82125

There is a possible denial of service vulnerability in the Range header parsing component of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-44570. Carefully crafted input can cause the Range header parsing component in Rack to take an unexpected amount of time, possibly resulting in a denial of service attack vector. Any applications that deal with Range requests (such as streaming applications, or applications that serve files) may be impacted.

Impact

ReDoS occurs when crafted values are sent to request headers. Especially in Rails, access to public directories is affected.

It was possible to attack ReDoS on many servers without authentication, but in the case of this regular expression, if it is ruby 3.2 or higher, there is a memoization countermeasure, so it is not a threat.

The original report as published on HackerOne, by ooooooo_q. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 Rack's Range header parser that is vulnerable to catastrophic backtracking (ReDoS).

Impact

An unauthenticated attacker could cause a denial of service by sending crafted Range headers, though on Ruby 3.2 or higher a memoization countermeasure reduces the threat.

What the attacker needed

No authentication needed; server parses Range headers

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 is a pattern used to check or extract text. Some patterns can become extremely slow when given specially crafted input, a problem called ReDoS (regular expression denial of service). Here, an attacker could send a request with a malicious Range header, which tells a server which part of a file to send, and tie up the server's processing time.

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.

More by ooooooo_q

View all

53 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.