The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-49761

CVE-2024-49761: Ruby-lang Rexml DoS Vulnerability

CVE-2024-49761 is a ReDoS denial-of-service vulnerability in Ruby-lang Rexml affecting Ruby 3.1 when parsing XML with hex numeric character references. This article covers technical details, affected versions, and patches.

Published: January 28, 2026

CVE-2024-49761 Overview

CVE-2024-49761 is a Regular Expression Denial of Service (ReDoS) vulnerability in REXML, the XML toolkit for Ruby. The vulnerability exists in REXML gem versions before 3.3.9, where parsing an XML document containing many digits between &# and x...; in a hex numeric character reference (&#x...;) triggers catastrophic backtracking in the regular expression engine, leading to denial of service conditions.

This vulnerability specifically affects Ruby 3.1, which is the only affected maintained Ruby version at the time of disclosure. Ruby 3.2 and later versions are not vulnerable due to improvements in the regex engine.

Critical Impact

Applications using REXML to parse untrusted XML input on Ruby 3.1 are vulnerable to denial of service attacks through crafted hex numeric character references, potentially causing application unavailability.

Affected Products

  • ruby-lang rexml (versions before 3.3.9)
  • ruby-lang ruby (version 3.1.x series)
  • netapp ontap_tools (version 10 for VMware vSphere)

Discovery Timeline

  • 2024-10-28 - CVE-2024-49761 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2024-49761

Vulnerability Analysis

The vulnerability is classified as CWE-1333 (Inefficient Regular Expression Complexity), commonly known as ReDoS (Regular Expression Denial of Service). The flaw resides in REXML's base parser component (lib/rexml/parsers/baseparser.rb), where the CHARACTER_REFERENCES regular expression pattern improperly handles hex numeric character references.

The vulnerable regex pattern contained a quantifier (0*) that allowed unlimited leading zeros in character references, creating conditions for catastrophic backtracking. When processing malicious XML input with hex numeric character references containing many digits, the regex engine's backtracking behavior causes exponential time complexity, effectively freezing the application.

Root Cause

The root cause lies in the CHARACTER_REFERENCES constant defined in the base parser. The original regex pattern /�*((?:\d+)|(?:x[a-fA-F0-9]+));/ incorrectly accepted �x...; format (with leading zeros before the x) as a valid character reference. The 0* quantifier allowed matching of an arbitrary number of zeros, which combined with the alternation group created a pattern susceptible to catastrophic backtracking when processing malformed input with many digits.

Attack Vector

An attacker can exploit this vulnerability by supplying a crafted XML document to any application using REXML for XML parsing on Ruby 3.1. The attack vector is network-based and requires no authentication or user interaction. The malicious XML would contain hex numeric character references with excessive digits between &# and the terminating semicolon, triggering the inefficient regex matching behavior.

ruby
# Security patch in lib/rexml/parsers/baseparser.rb
# Source: https://github.com/ruby/rexml/commit/ce59f2eb1aeb371fe1643414f06618dbe031979f

         PEDECL_PATTERN = "\\s+(%)\\s+#{NAME}\\s+#{PEDEF}\\s*>"
         ENTITYDECL_PATTERN = /(?:#{GEDECL_PATTERN})|(?:#{PEDECL_PATTERN})/um
         CARRIAGE_RETURN_NEWLINE_PATTERN = /\r\n?/
-        CHARACTER_REFERENCES = /�*((?:\d+)|(?:x[a-fA-F0-9]+));/
+        CHARACTER_REFERENCES = /&#((?:\d+)|(?:x[a-fA-F0-9]+));/
         DEFAULT_ENTITIES_PATTERNS = {}
         default_entities = ['gt', 'lt', 'quot', 'apos', 'amp']
         default_entities.each do |term|

The fix removes the 0* quantifier from the regex pattern, preventing the acceptance of malformed character references and eliminating the ReDoS condition.

Detection Methods for CVE-2024-49761

Indicators of Compromise

  • Unusual CPU spikes in Ruby processes handling XML parsing operations
  • Application timeouts or hangs when processing XML documents from external sources
  • Memory consumption increases in REXML-dependent services without proportional traffic increases
  • Log entries showing extended XML parsing times or timeout errors

Detection Strategies

  • Monitor Ruby application logs for REXML parsing errors or extended processing times
  • Implement application performance monitoring (APM) to detect abnormal CPU utilization during XML processing
  • Review inbound XML documents for suspicious hex numeric character references with excessive digit sequences
  • Deploy web application firewall (WAF) rules to detect XML payloads with anomalous character reference patterns

Monitoring Recommendations

  • Enable detailed logging for XML parsing operations in production environments
  • Configure alerting thresholds for Ruby process CPU and memory utilization
  • Implement request timeout mechanisms for endpoints accepting XML input
  • Establish baseline metrics for XML processing duration to detect deviations

How to Mitigate CVE-2024-49761

Immediate Actions Required

  • Upgrade REXML gem to version 3.3.9 or later immediately
  • Upgrade Ruby to version 3.2 or later if possible, as later versions are not affected
  • Implement input validation to reject XML documents with suspicious character references
  • Apply network-level rate limiting to endpoints processing XML input

Patch Information

The vulnerability has been patched in REXML gem version 3.3.9. The fix modifies the CHARACTER_REFERENCES regex pattern in lib/rexml/parsers/baseparser.rb to remove the problematic 0* quantifier, ensuring proper validation of hex numeric character references.

Official resources for patching:

  • GitHub Commit Details
  • Ruby Official Security Advisory
  • GitHub Security Advisory

Workarounds

  • If immediate gem upgrade is not possible, consider migrating to alternative XML parsing libraries such as Nokogiri
  • Implement request timeout mechanisms for XML parsing operations to limit DoS impact
  • Deploy input sanitization to filter or reject XML documents with hex numeric character references containing excessive digits
  • Consider upgrading to Ruby 3.2 or later, which includes regex engine improvements that prevent this ReDoS condition
bash
# Upgrade REXML gem to patched version
gem update rexml

# Or specify minimum version in Gemfile
echo 'gem "rexml", ">= 3.3.9"' >> Gemfile
bundle update rexml

# Verify installed version
gem list rexml

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechRuby

  • SeverityMEDIUM

  • CVSS Score6.6

  • EPSS Probability1.25%

  • Known ExploitedNo
  • CVSS 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-1333
  • Technical References
  • GitHub Security Advisory

  • Debian LTS Announcement

  • NetApp Security Advisory
  • Vendor Resources
  • GitHub Commit Details

  • Ruby News on CVE-2024-49761
  • Related CVEs
  • CVE-2023-36617: Ruby-lang URI DoS Vulnerability

  • CVE-2023-28755: Ruby-lang Uri DoS Vulnerability

  • CVE-2023-28756: Ruby-lang Ruby ReDoS Vulnerability

  • CVE-2025-27220: Ruby-lang CGI ReDoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English