CVE-2024-47887 Action Controller has possible ReDoS vulnerability in HTTP Token authentication
Attackers can cause denial of service in Rails applications using HTTP Token authentication by sending crafted headers that trigger excessive parsing time.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-47887?
CVE-2024-47887 is a medium-severity denial of service vulnerability in rails, published on 16 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Action Pack is a framework for handling and responding to web requests. Starting in version 4.0.0 and prior to versions 6.1.7.9, 7.0.8.5, 7.1.4.1, and 7.2.1.1, there is a possible ReDoS vulnerability in Action Controller's HTTP Token authentication. For applications using HTTP Token authentication via `authenticate_or_request_with_http_token` or similar, a carefully crafted header may cause header parsing to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade to versions 6.1.7.9, 7.0.8.5, 7.1.4.1, or 7.2.1.1 or apply the relevant patch immediately. One may choose to use Ruby 3.2 as a workaround.Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.
Weakness: CWE-1333
Which versions are affected by CVE-2024-47887?
9 open source packages ship an affected version, including rails and actionpack.
| Package | Affected | Fixed in |
|---|---|---|
rails Bitnami | From 4.0.0 | 6.1.8, 7.0.9, 7.1.5, 7.2.2 |
actionpack RubyGems | From 4.0.0 | 6.1.7.9 |
actionpack RubyGems | From 4.0.0 | 6.1.7.9 |
actionpack RubyGems | From 7.0.0 | 7.0.8.5 |
actionpack RubyGems | From 7.0.0 | 7.0.8.5 |
actionpack RubyGems | From 7.1.0 | 7.1.4.1 |
3 more packages
actionpack RubyGems | From 7.1.0 | 7.1.4.1 |
actionpack RubyGems | From 7.2.0 | 7.2.1.1 |
actionpack RubyGems | From 7.2.0 | 7.2.1.1 |
How do I fix CVE-2024-47887?
Upgrade rails to a fixed version for your release line: 6.1.8, 7.0.9, 7.1.5 or 7.2.2.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-47887 being exploited?
There is no known exploitation of CVE-2024-47887 in the wild and no public exploit code.
Sources
Also known as BIT-rails-2024-47887, DEBIAN-CVE-2024-47887, GHSA-vfg9-r3fq-jvx4, UBUNTU-CVE-2024-47887.