Skip to content
DoS Disclosed report Intermediate CVE-2024-39316

ReDoS Vulnerability in HTTP Accept Headers Parsing

A regular expression denial of service flaw existed in Rack's parsing of HTTP Accept headers. An unauthenticated attacker could send crafted Accept-Encoding or Accept-Language headers to make the server spend excessive time processing requests, potentially making it unavailable.

dwisiswant0 Follow

Originally disclosed on HackerOne

Bounty$2,642incl. $500 bonus Medium View original
  • Triaged in 8 hours
  • Fixed in 4 months
  • Paid in 52 days
  • Disclosed after 4 months

Summary by the program

ReDoS Vulnerability in HTTP Accept Headers Parsing

Summary A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Rack::Request::Helpers module when parsing HTTP Accept headers. This vulnerability can be exploited by an attacker sending specially crafted Accept-Encoding or Accept-Language headers, causing the server to spend excessive time processing the request and leading to a Denial of Service (DoS).

Details The fix for GHSA-54rr-7fvw-6x8f was not applied to the main branch and thus while the issue was fixed for the Rack v3.0 release series, it was not fixed in the v3.1 release series until v3.1.5.

GHSA link: https://github.com/rack/rack/security/advisories/GHSA-cj83-2ww7-mvq7

The report

A regular Expression Denial of Service (ReDoS) vulnerability exists in the Rack::Request::Helpers module when parsing HTTP Accept headers. This vulnerability can be exploited by an attacker sending specially crafted Accept-Encoding or Accept-Language headers, causing the server to spend excessive time processing the request and leading to a Denial of Service (DoS). This vulnerability affects Rack versions greater than 3.0.0 and up to and including 3.1.4

Impact

Any unauthenticated user can exploit this vulnerability by sending a specially crafted request, causing the server to spend excessive time processing the request and potentially making the server unavailable.

The original report as published on HackerOne, by dwisiswant0. 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

Impact

Any unauthenticated user could send a crafted request to make the server spend excessive time processing it, potentially making the server unavailable.

What the attacker needed

No authentication needed; send crafted Accept-Encoding or Accept-Language header

The fix

The issue was fixed in Rack v3.1.5 after the earlier fix for GHSA-54rr-7fvw-6x8f was not applied to the main branch.

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 match text, and some patterns can take a very long time on certain inputs. Here, the server used such a pattern to read the Accept-Encoding or Accept-Language headers, so a specially crafted header could keep it busy for a long time. That slows the server down for everyone, which is 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.

More by dwisiswant0

View all

1 more disclosed report, 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.