CVE-2024-49761: CWE-1333: Inefficient Regular Expression Complexity in ruby rexml
REXML is an XML toolkit for Ruby. The REXML gem before 3.3.9 has a ReDoS vulnerability when it parses an XML that has many digits between &# and x...; in a hex numeric character reference (&#x...;). This does not happen with Ruby 3.2 or later. Ruby 3.1 is the only affected maintained Ruby. The REXML gem 3.3.9 or later include the patch to fix the vulnerability.
AI Analysis
Technical Summary
CVE-2024-49761 identifies a ReDoS vulnerability in the Ruby REXML gem, a widely used XML parsing toolkit for Ruby applications. The flaw arises from inefficient regular expression handling when parsing XML documents containing hex numeric character references with many digits (e.g., &#x...;). This causes the regex engine to consume excessive CPU cycles, leading to potential denial of service conditions. The vulnerability affects REXML versions before 3.3.9 and specifically impacts Ruby 3.1, which is still maintained; Ruby 3.2 and later versions are not vulnerable due to changes in the XML parsing implementation. The vulnerability can be triggered remotely by processing crafted XML inputs without requiring authentication or user interaction, increasing the attack surface. The CVSS 4.0 vector indicates network attack vector (AV:N), low attack complexity (AC:L), no privileges or user interaction required (PR:N/UI:N), and a high impact on availability (VA:H), with no impact on confidentiality or integrity. Although no exploits have been observed in the wild, the vulnerability poses a moderate risk to applications relying on vulnerable REXML versions for XML processing, especially in web services or APIs that accept XML input. The patch was released in REXML 3.3.9, which addresses the inefficient regex complexity to prevent CPU exhaustion.
Potential Impact
For European organizations, this vulnerability can lead to denial of service conditions in applications that parse XML using vulnerable versions of the REXML gem on Ruby 3.1. This can disrupt business-critical services, degrade performance, and increase operational costs due to resource exhaustion. Industries such as finance, healthcare, government, and telecommunications that process XML data extensively and rely on Ruby-based applications are particularly at risk. The vulnerability could be exploited remotely without authentication, potentially allowing attackers to disrupt services at scale. While it does not compromise data confidentiality or integrity, the availability impact can cause significant operational disruptions and reputational damage. Organizations using Ruby 3.2 or later are not affected, reducing the overall risk if they maintain up-to-date environments.
Mitigation Recommendations
European organizations should immediately audit their Ruby environments to identify usage of REXML gem versions prior to 3.3.9, especially on Ruby 3.1. Upgrading the REXML gem to version 3.3.9 or later is the primary mitigation step. If upgrading is not immediately feasible, consider implementing input validation or filtering to detect and block XML inputs containing suspiciously long hex numeric character references. Employ runtime resource limits and monitoring to detect abnormal CPU usage patterns indicative of ReDoS attempts. Additionally, isolate XML parsing components behind rate limiting and web application firewalls (WAFs) configured to detect anomalous XML payloads. Encourage development teams to migrate to Ruby 3.2 or later where this vulnerability is not present. Regularly update dependencies and monitor vulnerability advisories to stay ahead of similar issues.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland, Belgium, Italy, Spain
CVE-2024-49761: CWE-1333: Inefficient Regular Expression Complexity in ruby rexml
Description
REXML is an XML toolkit for Ruby. The REXML gem before 3.3.9 has a ReDoS vulnerability when it parses an XML that has many digits between &# and x...; in a hex numeric character reference (&#x...;). This does not happen with Ruby 3.2 or later. Ruby 3.1 is the only affected maintained Ruby. The REXML gem 3.3.9 or later include the patch to fix the vulnerability.
AI-Powered Analysis
Technical Analysis
CVE-2024-49761 identifies a ReDoS vulnerability in the Ruby REXML gem, a widely used XML parsing toolkit for Ruby applications. The flaw arises from inefficient regular expression handling when parsing XML documents containing hex numeric character references with many digits (e.g., &#x...;). This causes the regex engine to consume excessive CPU cycles, leading to potential denial of service conditions. The vulnerability affects REXML versions before 3.3.9 and specifically impacts Ruby 3.1, which is still maintained; Ruby 3.2 and later versions are not vulnerable due to changes in the XML parsing implementation. The vulnerability can be triggered remotely by processing crafted XML inputs without requiring authentication or user interaction, increasing the attack surface. The CVSS 4.0 vector indicates network attack vector (AV:N), low attack complexity (AC:L), no privileges or user interaction required (PR:N/UI:N), and a high impact on availability (VA:H), with no impact on confidentiality or integrity. Although no exploits have been observed in the wild, the vulnerability poses a moderate risk to applications relying on vulnerable REXML versions for XML processing, especially in web services or APIs that accept XML input. The patch was released in REXML 3.3.9, which addresses the inefficient regex complexity to prevent CPU exhaustion.
Potential Impact
For European organizations, this vulnerability can lead to denial of service conditions in applications that parse XML using vulnerable versions of the REXML gem on Ruby 3.1. This can disrupt business-critical services, degrade performance, and increase operational costs due to resource exhaustion. Industries such as finance, healthcare, government, and telecommunications that process XML data extensively and rely on Ruby-based applications are particularly at risk. The vulnerability could be exploited remotely without authentication, potentially allowing attackers to disrupt services at scale. While it does not compromise data confidentiality or integrity, the availability impact can cause significant operational disruptions and reputational damage. Organizations using Ruby 3.2 or later are not affected, reducing the overall risk if they maintain up-to-date environments.
Mitigation Recommendations
European organizations should immediately audit their Ruby environments to identify usage of REXML gem versions prior to 3.3.9, especially on Ruby 3.1. Upgrading the REXML gem to version 3.3.9 or later is the primary mitigation step. If upgrading is not immediately feasible, consider implementing input validation or filtering to detect and block XML inputs containing suspiciously long hex numeric character references. Employ runtime resource limits and monitoring to detect abnormal CPU usage patterns indicative of ReDoS attempts. Additionally, isolate XML parsing components behind rate limiting and web application firewalls (WAFs) configured to detect anomalous XML payloads. Encourage development teams to migrate to Ruby 3.2 or later where this vulnerability is not present. Regularly update dependencies and monitor vulnerability advisories to stay ahead of similar issues.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
 - 5.2
 - Assigner Short Name
 - GitHub_M
 - Date Reserved
 - 2024-10-18T13:43:23.455Z
 - Cvss Version
 - 4.0
 - State
 - PUBLISHED
 
Threat ID: 6909214ffe7723195e054697
Added to database: 11/3/2025, 9:40:31 PM
Last enriched: 11/3/2025, 9:47:28 PM
Last updated: 11/4/2025, 3:53:54 AM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-11841: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wpsoul Greenshift – animation and page builder blocks
MediumCVE-2025-47370: CWE-617 Reachable Assertion in Qualcomm, Inc. Snapdragon
MediumCVE-2025-47368: CWE-126 Buffer Over-read in Qualcomm, Inc. Snapdragon
HighCVE-2025-47367: CWE-787: Out-of-bounds Write in Qualcomm, Inc. Snapdragon
HighCVE-2025-47365: CWE-190 Integer Overflow or Wraparound in Qualcomm, Inc. Snapdragon
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.