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

[CVE-2024-35176] DoS vulnerability in REXML

REXML, a Ruby XML parser, took a long time to parse XML documents with many '<' characters in an attribute value. An attacker could cause a denial of service by submitting such XML to an application that parses user input with REXML.

mprogrammer Follow

Originally disclosed on HackerOne

Bounty$2,142 Medium 5.3 View original
  • Triaged in 6 days
  • Fixed in 16 days
  • Paid in 16 days
  • Disclosed after 16 days

Summary by the program

CVE-2024-35176: DoS vulnerability in REXML

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

Details When parsing an XML document that has many < in an attribute value, REXML gem may take long time.

Please update REXML gem to version 3.2.7 or later.

Affected versions REXML gem 3.2.6 or prior

Credits Thanks to mprogrammer for discovering this issue.

Full Security Advisory: https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/

The report

I sent my original report here: https://hackerone.com/reports/2490560 REXML had a vulnerability where repeated > characters in an attribute value took a very long time for the parser to finish. The wait times increased exponentially the larger the string.

Impact

Reduced performance or Denial of Service was possible where REXML is used to parse user input. Rails uses REXML to convert XML to a hash, so this was susceptible:

RB
Hash.from_xml(request.body.read)

The original report as published on HackerOne, by mprogrammer. 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

Root cause

Likely the parser's handling of attribute values with many '<' characters led to long parse times.

Impact

Reduced performance or Denial of Service was possible where REXML is used to parse user input, including Rails applications using Hash.from_xml.

What the attacker needed

Application parses user-supplied XML with REXML

The fix

The vulnerability was fixed by updating REXML gem to version 3.2.7 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.

XML is a common format for exchanging data, and parsers read it. REXML is a Ruby library for parsing XML. If a parser is slow on certain inputs, an attacker can send a crafted document to make the server hang, which is a denial of service.

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 mprogrammer

View all

3 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.