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

[CVE-2024-26146] Header Parsing leads to Possible Denial of Service Vulnerability

Rack's header parsing routines take longer than expected when processing carefully crafted Accept and Forwarded headers, which could lead to a denial of service. The text does not describe the exact mechanism or demonstrate an exploit.

svalkanov Follow

Originally disclosed on HackerOne

  • Triaged in 40 hours
  • Fixed in 21 days
  • Paid in 21 days
  • Disclosed after 51 days

Summary by the program

Possible Denial of Service Vulnerability in Rack Header Parsing

There is a possible denial of service vulnerability in the header parsing routines in Rack. This vulnerability has been assigned the CVE identifier CVE-2024-26146.

Versions Affected: All. Not affected: None Fixed Versions: 2.0.9.4, 2.1.4.4, 2.2.8.1, 3.0.9.1

Impact Carefully crafted headers can cause header parsing in Rack to take longer than expected resulting in a possible denial of service issue. Accept and Forwarded headers are impacted.

Ruby 3.2 has mitigations for this problem, so Rack applications using Ruby 3.2 or newer are unaffected.

Full Security Advisory: https://discuss.rubyonrails.org/t/possible-denial-of-service-vulnerability-in-rack-header-parsing/84942 GHSA:https://github.com/advisories/GHSA-54rr-7fvw-6x8f

The report

I've made a report and provided a patch https://discuss.rubyonrails.org/t/possible-denial-of-service-vulnerability-in-rack-header-parsing/84942

Impact

Carefully crafted headers can cause header parsing in Rack to take longer than expected resulting in a possible denial of service issue. Accept and Forwarded headers are impacted.

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Rack is the Ruby web server interface that sits between Ruby web servers and Ruby web frameworks. Among other things it parses HTTP request headers, including the Accept and Forwarded headers, and turns them into structured data that applications can use.

The report concerns a denial of service issue in those header parsing routines. The program summary states that carefully crafted headers can cause header parsing in Rack to take longer than expected, resulting in a possible denial of service. The issue was assigned the CVE identifier CVE-2024-26146 and classified as Uncontrolled Resource Consumption, with low severity.

Setup

The report gives no information about accounts, roles, tooling or a test environment. What it does state is the version scope:

Item Detail
Versions affected All
Versions not affected None
Fixed versions [redacted], [redacted], [redacted], [redacted]
Headers impacted Accept and Forwarded

One precondition matters for exploitability: Ruby 3.2 has mitigations for this problem, so Rack applications using Ruby 3.2 or newer are unaffected. The advisory states that Rack applications using Ruby 3.2 or newer are unaffected because of runtime mitigations.

Finding it

The researcher does not describe the discovery process in the report. The report itself is short: it points to a public report and patch posted on the Ruby on Rails discussion forum, and repeats the impact statement from the advisory. The advisory states that carefully crafted Accept or Forwarded headers can cause header parsing in Rack to take longer than expected.

Exploitation

The report does not include a request, payload, command or response. It does not show a concrete header value, a timing measurement or a reproduction. What it establishes is the shape of the attack: an attacker sends requests whose Accept or Forwarded headers are crafted so that Rack's parsing of those headers takes longer than expected. The advisory describes this as a possible denial of service issue.

Because no payload is given, there is nothing to copy here. The two headers named in the advisory are the only concrete attack surface the report identifies.

Root cause

What it states is the observable effect: header parsing in Rack takes longer than expected on carefully crafted Accept and Forwarded headers. The weakness is classified as Uncontrolled Resource Consumption.

Why existing defences did not stop it is not discussed in the report. The one mitigation it names is at the runtime level: Ruby 3.2 includes mitigations for this problem, so applications on Ruby 3.2 or newer are unaffected even without the Rack upgrade.

Impact

Carefully crafted Accept or Forwarded headers can cause Rack's header parsing to take longer than expected, resulting in a possible denial of service. The advisory hedges this as a possible issue rather than a demonstrated outage.

The affected population is broad: all Rack versions are listed as affected and none as unaffected, with the exception of applications running on Ruby 3.2 or newer, which the advisory says are unaffected because of runtime mitigations.

Fix

The advisory lists fixed versions: [redacted], [redacted], [redacted] and 3.0.9.1. The researcher states that a patch was provided alongside the public report on the Ruby on Rails discussion forum.

The advisory states that Rack applications using Ruby 3.2 or newer are unaffected.

Variants to test

The report names only Accept and Forwarded, so any extension beyond those is inference rather than something it documents. Concrete things to try on other targets:

  1. Send requests with unusual Accept header values and measure response time against a baseline request with a simple Accept value. A positive result is response time that grows with the complexity of the header rather than staying flat.
  2. Do the same with Forwarded header values. A positive result is the same scaling behaviour on that header.
  3. Compare timings across Rack versions on either side of the fixed releases ([redacted], [redacted], [redacted], [redacted]) and across Ruby versions before and after 3.2. A positive result is a measurable difference that matches the advisory's scope.
  4. Look for other headers that a framework parses into structured lists or addresses, and time them the same way. The report does not claim these are affected; this is a way to look for the same class of bug elsewhere.

Hunting notes

This kind of bug hides in request parsing code that turns header strings into structured data: list-valued headers, address lists, and anything with nested or quoted syntax. The signal during recon is a stack where the framework parses such headers on every request, combined with a Ruby version older than 3.2 and a Rack version outside the fixed list.

What it does show is the route the researcher took: a public report with a patch on the project's discussion forum, a CVE identifier, and a security advisory with an explicit affected and fixed version matrix. For a low-severity resource consumption issue, that version matrix and the named headers are what make the report actionable for defenders deciding whether to upgrade.

Primary references given in the report:

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

A possible denial of service issue was reported in Rack, software used by many Ruby websites. Rack is a building block used by many Ruby websites. The problem is in the part of Rack that reads certain lines of information that every web browser sends along with a request. If those lines are written in a deliberately awkward way, Rack spends much longer than it should working out what they mean. The advisory describes this as a possible denial of service issue. This is called a denial of service: the attacker does not steal anything, they just make the service unavailable.

The issue was given the identifier CVE-2024-26146. A CVE is a public catalogue number for a known security flaw, so people can talk about the same bug unambiguously. The weakness was classified as Uncontrolled Resource Consumption, which simply means the software uses more of something (here, processing time) than it should, because an outsider controls how much work it is asked to do. The severity was rated low.

The researcher's own report is very short. It says a report and a patch were posted on the Ruby on Rails discussion forum, and it repeats the impact statement. The longer explanation below comes from the program summary that accompanies it.

Context

What Rack is

When you visit a website, your browser sends a request to a web server. In the Ruby world, the web server (the program that listens for connections) and the web framework (the program that decides what page to build) are usually separate pieces of software. Rack is the connector in between: it is the agreed way for the two to talk to each other. Think of it as the standard plug and socket that lets any Ruby web server work with any Ruby web framework.

Part of Rack's job is to read the request as it arrives and translate it into tidy, structured data that the application can use. A request is not just a URL. It also carries a set of headers: short labelled lines of extra information. For example, your browser tells the server which languages it prefers, or which kind of content it can display. Rack reads those lines and turns them into something the application can work with, such as a list of items rather than one long piece of text.

Two of those headers matter here:

  • Accept: the browser uses it to say what kind of response it would like, for example a web page or an image.
  • Forwarded: used when a request passes through an intermediary (such as a proxy or load balancer) to record where the request originally came from.

What the problem is

The program summary says that carefully crafted headers can cause header parsing in Rack to take longer than expected, resulting in a possible denial of service. In other words, the work Rack does to understand the Accept and Forwarded headers can be made to grow when the header is written in a particular way. If an attacker can make that work grow a lot, and can send many such requests, the server spends its time on parsing instead of serving people.

A useful everyday comparison: imagine a receptionist who has to read out a visitor's name letter by letter. Normally that takes a second. But if someone hands over a name written in a deliberately confusing way, the receptionist has to stop, re-read, and check again and again. One such visitor is a nuisance; a queue of them means nobody else gets seen.

The issue was assigned CVE-2024-26146 and classified as Uncontrolled Resource Consumption, with low severity.

Setup

The report gives no information about accounts, roles, tooling or a test environment. There is nothing to install and no special access needed to understand it. What it does state is which versions of Rack are affected and which are fixed:

Item Detail
Versions affected All
Versions not affected None
Fixed versions [redacted], [redacted], [redacted], [redacted]
Headers impacted Accept and Forwarded

A version number is like an edition number for software: [redacted] is a later, corrected edition of the 2.0 line, and so on. The table says every edition of Rack had the problem, and lists the four corrected editions to upgrade to.

One precondition matters for whether the bug can actually be triggered: Ruby 3.2 has mitigations for this problem, so Rack applications using Ruby 3.2 or newer are unaffected. Ruby is the programming language Rack is written in, and its version 3.2 includes protections that neutralise this particular issue. The advisory states that Rack applications using Ruby 3.2 or newer are unaffected because of runtime mitigations.

Finding it

The researcher does not describe the discovery process in the report. The report itself is short: it points to a public report and patch posted on the Ruby on Rails discussion forum, and repeats the impact statement from the advisory.

The reasoning that can be reconstructed from the advisory is that the header parsing routines in Rack take longer than expected when they receive carefully crafted Accept or Forwarded headers. That is what made the behaviour look wrong: parsing cost that scales with attacker-controlled input is a resource consumption problem rather than a correctness problem. In plain terms, the advisory says parsing can take longer than expected.

Exploitation

The report does not include a request, payload, command or response. It does not show a concrete header value, a timing measurement or a reproduction. What it establishes is the shape of the attack: an attacker sends requests whose Accept or Forwarded headers are crafted so that Rack's parsing of those headers takes longer than expected.

Because no payload is given, there is nothing to copy here. The two headers named in the advisory are the only concrete attack surface the report identifies.

To unpack the words: a payload is the actual malicious content an attacker sends. A reproduction is a set of steps that lets someone else see the problem for themselves. A timing measurement is simply recording how long a request takes, so you can compare a normal request with a crafted one. None of these appear in the report, which is why the write-up stays at the level of describing the shape of the attack rather than demonstrating it.

Root cause

What it states is the observable effect: header parsing in Rack takes longer than expected on carefully crafted Accept and Forwarded headers.

The weakness classification, Uncontrolled Resource Consumption, is consistent with parsing work that grows with the attacker-controlled header content rather than being bounded. "Bounded" means there is a fixed ceiling on how much work a piece of input can cause. The weakness is classified as Uncontrolled Resource Consumption.

Why existing defences did not stop it is not discussed in the report. The one mitigation it names is at the runtime level: Ruby 3.2 includes mitigations for this problem, so applications on Ruby 3.2 or newer are unaffected even without the Rack upgrade. A mitigation is a change that reduces the harm even if the underlying flaw is still present.

Impact

Carefully crafted Accept or Forwarded headers can cause Rack's header parsing to take longer than expected, resulting in a possible denial of service. "Remote" means the attacker does not need to be on the same machine or network; sending requests over the internet is enough. The advisory hedges this as a possible issue rather than a demonstrated outage, so it describes a risk rather than a confirmed incident.

The affected population is broad: all Rack versions are listed as affected and none as unaffected, with the exception of applications running on Ruby 3.2 or newer, which the advisory says are unaffected because of runtime mitigations.

Fix

The advisory lists fixed versions: [redacted], [redacted], [redacted] and 3.0.9.1. Upgrading means replacing the old edition of the software with the corrected one, in the same way you would install a newer version of any program. The researcher states that a patch was provided alongside the public report on the Ruby on Rails discussion forum. A patch is a small set of changes to the software's code that corrects the flaw.

The advisory states that Rack applications using Ruby 3.2 or newer are unaffected.

Variants to test

The report names only Accept and Forwarded, so any extension beyond those is inference rather than something it documents. Concrete things to try on other targets:

  1. Send requests with unusual Accept header values and measure response time against a baseline request with a simple Accept value. A baseline is a normal, unmodified request you time first, so you have something to compare against. A positive result is response time that grows with the complexity of the header rather than staying flat.
  2. Do the same with Forwarded header values. A positive result is the same scaling behaviour on that header.
  3. Compare timings across Rack versions on either side of the fixed releases ([redacted], [redacted], [redacted], [redacted]) and across Ruby versions before and after 3.2. A positive result is a measurable difference that matches the advisory's scope.
  4. Look for other headers that a framework parses into structured lists or addresses, and time them the same way. The report does not claim these are affected; this is a way to look for the same class of bug elsewhere.

Hunting notes

This kind of bug hides in request parsing code that turns header strings into structured data: list-valued headers, address lists, and anything with nested or quoted syntax. In other words, anywhere the software has to take a line of text and break it into parts, especially when those parts can contain other parts inside them, is a place where the amount of work can depend on how the text is written.

The signal during recon is a stack where the framework parses such headers on every request, combined with a Ruby version older than 3.2 and a Rack version outside the fixed list. "Recon" (reconnaissance) is the early stage of looking at a target to understand what it is built from. A "stack" here means the combination of software layers in use: the web server, Rack, the framework and the Ruby version underneath.

What it does show is the route the researcher took: a public report with a patch on the project's discussion forum, a CVE identifier, and a security advisory with an explicit affected and fixed version matrix. A security advisory is the official notice a project publishes about a flaw, including who is affected and what to do. For a low-severity resource consumption issue, that version matrix and the named headers are what make the report actionable for defenders deciding whether to upgrade.

Primary references given in the report:

A GHSA is a GitHub Security Advisory, the same kind of notice hosted on GitHub's advisory database.

Glossary

  • Rack: the Ruby software layer that sits between a Ruby web server and a Ruby web framework, translating requests into data the application can use.
  • Ruby: the programming language Rack is written in.
  • Web server: the program that listens for connections from browsers and receives requests.
  • Web framework: the program that decides what page or response to build for a request.
  • HTTP request: the message a browser sends to a server asking for something.
  • Header: a short labelled line of extra information sent with a request, such as which content types the browser accepts.
  • Accept header: the header a browser uses to say what kind of response it would like.
  • Forwarded header: the header used to record where a request originally came from when it passes through an intermediary such as a proxy.
  • Parsing: reading a piece of text and turning it into structured data the program can work with.
  • Denial of service (DoS): making a service unavailable to its normal users, for example by consuming its resources.
  • Uncontrolled Resource Consumption: a weakness where software uses more of a resource (such as processing time) than it should because an outsider controls how much work it is asked to do.
  • CVE: a public catalogue identifier for a known security flaw, so people can refer to the same bug unambiguously.
  • Severity: a rating of how serious a flaw is; this one was rated low.
  • Version: an edition number for software, such as 2.0.9.4.
  • Fixed version: a later edition of the software in which the flaw has been corrected.
  • Mitigation: a change that reduces the harm of a flaw, even if the underlying flaw is still present.
  • Runtime: the environment in which the software actually runs, here the Ruby version underneath the application.
  • Patch: a small set of changes to software code that corrects a flaw.
  • Payload: the actual malicious content an attacker sends.
  • Reproduction: a set of steps that lets someone else see a problem for themselves.
  • Baseline: a normal, unmodified measurement taken first so that later measurements can be compared against it.
  • Bounded: having a fixed ceiling on how much work a piece of input can cause.
  • Remote attacker: an attacker who can send requests over a network rather than needing to be on the same machine.
  • Recon (reconnaissance): the early stage of examining a target to understand what software it is built from.
  • Stack: the combination of software layers in use, such as web server, Rack, framework and Ruby version.
  • Security advisory: an official notice a project publishes about a flaw, including who is affected and what to do.
  • GHSA: a GitHub Security Advisory, the same kind of notice hosted on GitHub's advisory database.

More by svalkanov

View all

4 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.