Skip to content
DoS Disclosed report Intermediate CVE-2024-49761

CVE-2024-49761: ReDoS vulnerability in REXML

A regular expression denial of service (ReDoS) vulnerability exists in the REXML gem when parsing XML with many digits in a hex numeric character reference. An attacker could cause reduced performance or denial of service by supplying crafted XML input.

manun Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 33 days
  • Paid in 33 days
  • Disclosed after 33 days

Summary by the program

###CVE-2024-49761: ReDoS vulnerability in REXML

There is a ReDoS vulnerability in REXML gem. This vulnerability has been assigned the CVE identifier CVE-2024-49761. We strongly recommend upgrading the REXML gem.

This does not happen with Ruby 3.2 or later. Ruby 3.1 is the only affected maintained Ruby. Note that Ruby 3.1 will reach EOL on 2025-03.

###Details When parsing an XML that has many digits between &# and x...; in a hex numeric character reference (&#x...;).

Please update REXML gem to version 3.3.9 or later.

###Affected versions REXML gem 3.3.8 or prior with Ruby 3.1 or prior

The report

Hi, When REXML is used to parse an XML that has many digits between &# and x...; in a hex numeric character reference (&#x...;) may lead to ReDos. Advisory: https://www.ruby-lang.org/en/news/2024/10/28/redos-rexml-cve-2024-49761/

Impact

Reduced performance or Denial of Service was possible where REXML is used to parse user input.

The original report as published on HackerOne, by manun. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

Reduced performance or denial of service was possible where REXML is used to parse user input.

What the attacker needed

Ruby 3.1 or earlier; REXML gem 3.3.8 or prior; Application parses user-supplied XML

The fix

The REXML gem should be updated to version 3.3.9 or later.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

REXML is a library for reading XML in Ruby. A ReDoS attack sends specially crafted input that makes the library's pattern matching take a very long time, slowing down or crashing the application. This only affects older Ruby versions (3.1 and earlier).

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by manun

View all

2 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.