CVE-2024-49761
Ruby vulnerability analysis and mitigation

Overview

The REXML gem before version 3.3.9 contains a Regular Expression Denial of Service (ReDoS) vulnerability (CVE-2024-49761) discovered in October 2024. The vulnerability affects the XML parsing functionality when processing hex numeric character references with many digits between '&#' and 'x...;'. This issue specifically impacts Ruby 3.1, which is the only affected maintained Ruby version, while Ruby 3.2 and later versions are not affected (Ruby Advisory).

Technical details

The vulnerability exists in the XML parsing mechanism of REXML when handling hex numeric character references in the format '&#x...;'. The issue is specifically related to the character reference parsing pattern in the baseparser.rb file, which was modified from '/&#0*((?:\d+)|(?:x[a-fA-F0-9]+));/' to '/&#((?:\d+)|(?:x[a-fA-F0-9]+));/' to address the vulnerability. The CVSS v3.1 base score is 7.5 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

When successfully exploited, this vulnerability can lead to a Denial of Service (DoS) condition through Regular Expression Denial of Service (ReDoS). The vulnerability affects the availability of the system while having no impact on confidentiality or integrity (NetApp Advisory).

Mitigation and workarounds

The primary mitigation is to upgrade the REXML gem to version 3.3.9 or later, which includes the security patch. For systems that cannot be immediately updated, a workaround is to use Ruby 3.2 or later instead of Ruby 3.1, as these versions are not affected by the vulnerability. Note that Ruby 3.1 will reach End of Life (EOL) in March 2025 (Ruby Advisory).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-24293CRITICAL9.2
  • RubyRuby
  • activestorage
NoYesAug 14, 2025
CVE-2025-54887CRITICAL9.1
  • RubyRuby
  • jwe
NoYesAug 08, 2025
CVE-2025-58067MEDIUM4.2
  • RubyRuby
  • google_sign_in
NoYesAug 29, 2025
CVE-2025-57821MEDIUM4.2
  • RubyRuby
  • google_sign_in
NoYesAug 27, 2025
CVE-2025-55193LOW2.7
  • RubyRuby
  • cpe:2.3:a:rubyonrails:rails
NoYesAug 13, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management