CVE-2024-47889 Action Mailer has possible ReDoS vulnerability in block_format

Medium 6.6 Published Updated

Attackers can cause denial of service in Rails applications by sending crafted text to the Action Mailer block_format helper.

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-47889?

CVE-2024-47889 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 Mailer is a framework for designing email service layers. Starting in version 3.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 the block_format helper in Action Mailer. Carefully crafted text can cause the block_format helper 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. As a workaround, users can avoid calling the `block_format` helper or upgrade to Ruby 3.2. Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 requires Ruby 3.2 or greater so is unaffected.

Weakness: CWE-1333

Which versions are affected by CVE-2024-47889?

9 open source packages ship an affected version, including rails and actionmailer.

PackageAffectedFixed in
rails BitnamiFrom 3.0.06.1.8, 7.0.9, 7.1.4, 7.2.2
actionmailer RubyGemsFrom 3.0.06.1.7.9
actionmailer RubyGemsFrom 3.0.06.1.7.9
actionmailer RubyGemsFrom 7.0.07.0.8.5
actionmailer RubyGemsFrom 7.0.07.0.8.5
actionmailer RubyGemsFrom 7.1.07.1.4.1
3 more packages
actionmailer RubyGemsFrom 7.1.07.1.4.1
actionmailer RubyGemsFrom 7.2.07.2.1.1
actionmailer RubyGemsFrom 7.2.07.2.1.1
Linux distribution packages (6)
rubygem-actionmailer-5_1 SUSE:Linux Enterprise High Availability Extension 15 SP2All versions5.1.4-150000.3.3.1
rubygem-actionmailer-5_1 SUSE:Linux Enterprise High Availability Extension 15 SP3All versions5.1.4-150000.3.3.1
rubygem-actionmailer-5_1 SUSE:Linux Enterprise High Availability Extension 15 SP4All versions5.1.4-150000.3.3.1
rubygem-actionmailer-5_1 SUSE:Linux Enterprise High Availability Extension 15 SP5All versions5.1.4-150000.3.3.1
rubygem-actionmailer-7.0 openSUSE:TumbleweedAll versions7.0.8.6-1.1
rubygem-actionmailer-7.0 openSUSE:TumbleweedAll versions7.0.8.6-1.3

How do I fix CVE-2024-47889?

Upgrade rails to a fixed version for your release line: 6.1.8, 7.0.9, 7.1.4 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-47889 being exploited?

There is no known exploitation of CVE-2024-47889 in the wild and no public exploit code.

Sources

Also known as BIT-rails-2024-47889, DEBIAN-CVE-2024-47889, GHSA-h47h-mwp9-c6q6, OESA-2024-2383, SUSE-SU-2024:3878-1, UBUNTU-CVE-2024-47889 and 2 more.

Is CVE-2024-47889 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free