☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5.3 🐛 CWE-400
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-41123

CVE-2024-41123 Supply Chain Attack in Ruby
📅 PUBLISHED: 2024-08-01 14:18 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 1.28%
👁️
1.28% probability
32.1× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-41123 is a Denial of Service (DoS) vulnerability in the REXML gem for Ruby, affecting versions prior to 3.3.3. The vulnerability is triggered when REXML parses specially crafted XML documents containing an excessive number of specific characters, such as whitespace characters, >], and ]>. This can lead to resource exhaustion, causing the application to become unresponsive. The CVSS score is 5.3 (Medium), and while no public proof-of-concept (PoC) or exploit code is currently available, the vulnerability is considered exploitable remotely without authentication.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the Ruby ecosystem via the REXML gem, a core library for XML parsing. Organizations using Ruby applications that process untrusted XML input are at risk. The gem is widely used in web frameworks (e.g., Ruby on Rails) and standalone scripts. The fix is included in REXML version 3.3.3, and all users should upgrade immediately. No known malicious packages have been reported, but supply chain risks include delayed patching in downstream dependencies.

CVSS Breakdown & Threat Level

  • CVSS Score: 5.3 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
  • Confidentiality Impact: None (C:N) – No data exposure.
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: Low (A:L) – Resource exhaustion leads to degraded performance or denial of service.

Threat Level: Medium. While the impact is limited to availability, the low attack complexity and network vector make it a viable target for DoS attacks.

Deep Dive & Mechanics

The vulnerability resides in REXML's XML parsing logic. When parsing XML documents, REXML processes character sequences inefficiently. Specifically, the parser fails to handle large numbers of whitespace characters, >], and ]> sequences efficiently. This causes excessive CPU and memory consumption, leading to a denial of service.

Root Cause: Inefficient handling of character data in the parser's state machine. The parser does not properly bound the processing of repeated patterns, allowing an attacker to craft a small XML payload that triggers exponential resource usage.

Attack Scenario: An attacker sends a crafted XML payload to a Ruby application that uses REXML to parse XML (e.g., via an API endpoint). The payload contains a high density of the problematic characters, causing the server to hang or crash.

Affected Components:

  • REXML gem versions < 3.3.3
  • Ruby applications using REXML for XML parsing

Vulnerable vs. Patched Code

Vulnerable Code (REXML < 3.3.3): The vulnerable code likely resides in the parser's handling of character data. For example, in the Text or Whitespace parsing routines, the code may not limit the number of consecutive whitespace characters or specific sequences.

# Vulnerable example (simplified)
def parse_text(text)
  # Inefficient loop that processes each character individually
  text.each_char do |c|
    # Process character without bounds checking
  end
end

Patched Code (REXML >= 3.3.3): The patch introduces bounds checking and optimized processing for repeated characters.

# Patched example (simplified)
def parse_text(text)
  # Use efficient scanning with limits
  text.scan(/\s+/) do |match|
    # Process whitespace in chunks with a maximum size
    if match.length > MAX_WHITESPACE
      raise "Too many whitespace characters"
    end
  end
end

Key Differences:

  • The patched version adds limits on the number of consecutive problematic characters.
  • The patched version uses more efficient scanning methods (e.g., regex with bounds) instead of per-character loops.

Exploitation & Lab Setup

Red Team (Attacker)

Objective: Craft a malicious XML payload to cause a DoS on a Ruby application using REXML.

Lab Setup:

  1. Install a vulnerable Ruby environment (e.g., Ruby 3.0 with REXML 3.3.2).
  2. Create a simple Ruby script that parses XML using REXML.

Exploit Payload:

<?xml version="1.0"?>
<root>
  <data>
    <!-- Large number of whitespace characters -->
    <![CDATA[                                                                                                    ... (thousands of spaces) ...                                                                                                    ]]>
  </data>
</root>

Execution:

# Save the payload as malicious.xml
# Run the vulnerable script
ruby -e "require 'rexml/document'; REXML::Document.new(File.read('malicious.xml'))"

Expected Outcome: The script will consume excessive CPU and memory, potentially hanging or crashing.

Blue Team (Defender)

Detection:

  • Monitor for XML payloads with unusually high character counts or repeated patterns.
  • Use network monitoring to detect large XML requests to endpoints that parse XML.

Mitigation:

  • Upgrade REXML to version 3.3.3 or later.
  • Implement input validation and rate limiting on XML parsing endpoints.
  • Use a Web Application Firewall (WAF) to block suspicious XML payloads.

Hunting:

  • Search logs for XML parsing errors or timeouts.
  • Look for requests with Content-Type: application/xml and large body sizes.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • XML payloads containing excessive whitespace characters (e.g., >10,000 consecutive spaces).
    • XML payloads with repeated >] or ]> sequences.
    • High volume of XML requests to a single endpoint.
  • Host IOCs:

    • High CPU usage by Ruby processes.
    • Memory exhaustion in Ruby applications.
    • Application logs showing REXML::ParseException or timeout errors.
  • File IOCs:

    • Temporary files with large XML content in /tmp/ or application temp directories.

Detection Engineering

YARA Rule

rule CVE_2024_41123_REXML_DoS {
    meta:
        description = "Detects XML payloads targeting CVE-2024-41123 in REXML"
        author = "Valters IT"
        date = "2025-04-08"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-41123"
    strings:
        $whitespace = /\s{1000,}/  // Excessive whitespace
        $gt_bracket = />\]{100,}/   // Repeated >]
        $bracket_gt = /\]>{100,}/   // Repeated ]>
    condition:
        any of them
}

Sigma Rule

title: CVE-2024-41123 REXML DoS Detection
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects XML payloads with excessive whitespace or specific character sequences targeting REXML
author: Valters IT
date: 2025-04-08
logsource:
    category: webserver
    product: generic
detection:
    selection:
        http.request.body|contains|all:
            - '<?xml'
            - '<![CDATA['
        http.request.body|re: '\s{1000,}|>\]{100,}|]{100,}>'
    condition: selection
falsepositives:
    - Legitimate large XML files with many whitespace characters (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-41123 REXML DoS Attempt"; flow:to_server; content:"<?xml"; http_client_body; pcre:"/\s{1000,}|>\]{100,}|]{100,}>/R"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade REXML: Update to version 3.3.3 or later.
    gem update rexml
    
  2. Patch Management: Ensure all Ruby applications using REXML are updated.
  3. Input Validation: Implement XML payload size limits and character frequency checks.

Long-Term Mitigations:

  • Use a more robust XML parser (e.g., Nokogiri) if possible.
  • Deploy a WAF with rules to block excessive whitespace or repeated patterns.
  • Monitor for anomalous XML parsing behavior.

Workarounds:

  • If upgrading is not immediately possible, disable XML parsing for untrusted input.
  • Use a reverse proxy to filter XML requests before they reach the application.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-41123/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.