CVE Vulnerabilities

CVE-2024-49761

Inefficient Regular Expression Complexity

Published: Oct 28, 2024 | Modified: Nov 05, 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 IMPORTANT
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)
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