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.
The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.
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 | * |
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.