CVE Vulnerabilities

CVE-2024-49761

Inefficient Regular Expression Complexity

Published: Oct 28, 2024 | Modified: Dec 27, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM

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.

Weakness

The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.

Affected Software

Name Vendor Start Version End Version
Rexml Ruby-lang * 3.3.9 (excluding)
Red Hat Enterprise Linux 8 RedHat ruby:3.1-8100020241127152928.489197e6 *
Red Hat Enterprise Linux 8 RedHat ruby:2.5-8100020241127152844.489197e6 *
Red Hat Enterprise Linux 8.2 Advanced Update Support RedHat ruby:2.5-8020020241211125628.4cda2c84 *
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support RedHat ruby:2.5-8040020241211104816.522a0ee4 *
Red Hat Enterprise Linux 8.4 Telecommunications Update Service RedHat ruby:2.5-8040020241211104816.522a0ee4 *
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions RedHat ruby:2.5-8040020241211104816.522a0ee4 *
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support RedHat ruby:2.5-8060020241211101132.ad008a3a *
Red Hat Enterprise Linux 8.6 Telecommunications Update Service RedHat ruby:2.5-8060020241211101132.ad008a3a *
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions RedHat ruby:2.5-8060020241211101132.ad008a3a *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat ruby:3.1-8080020241210144941.63b34585 *
Red Hat Enterprise Linux 8.8 Extended Update Support RedHat ruby:2.5-8080020241211080135.63b34585 *
Red Hat Enterprise Linux 9 RedHat ruby-0:3.0.7-163.el9_5 *
Red Hat Enterprise Linux 9 RedHat ruby:3.1-9050020241127153348.9 *
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions RedHat ruby-0:3.0.4-160.1.el9_0 *
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions RedHat pcs-0:0.11.1-10.el9_0.6 *
Red Hat Enterprise Linux 9.2 Extended Update Support RedHat ruby-0:3.0.4-161.el9_2.2 *
Red Hat Enterprise Linux 9.2 Extended Update Support RedHat ruby:3.1-9020020241211060845.9 *
Red Hat Enterprise Linux 9.4 Extended Update Support RedHat ruby-0:3.0.7-162.el9_4.1 *
Red Hat Enterprise Linux 9.4 Extended Update Support RedHat ruby:3.1-9040020241205144759.9 *
Jruby Ubuntu trusty/esm *
Ruby2.3 Ubuntu esm-infra/xenial *
Ruby2.5 Ubuntu esm-infra/bionic *
Ruby2.7 Ubuntu focal *
Ruby3.0 Ubuntu jammy *
Ruby3.2 Ubuntu noble *
Ruby3.3 Ubuntu devel *
Ruby3.3 Ubuntu oracular *

Extended Description

	  Attackers can create crafted inputs that
	  intentionally cause the regular expression to use
	  excessive backtracking in a way that causes the CPU
	  consumption to spike.

Potential Mitigations

References