# CVE-2024-49761: REXML ReDoS vulnerability

> An attacker can cause a denial of service in applications using the REXML library by sending crafted XML with excessive digits in hex numeric character references.

- **Severity:** Medium 6.6 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Oct 2024
- **Updated:** 3 Nov 2025
- **Also known as:** ALPINE-CVE-2024-49761, ALSA-2024:10834, ALSA-2024:10850, ALSA-2024:10858, ALSA-2024:10860, ALSA-2025:11047, AZL-51876, AZL-51894, AZL-51904, AZL-51908, CLSA-2025-1745053071, DEBIAN-CVE-2024-49761, ECHO-7b6a-b6b8-deb0, MINI-ccr5-4hxf-p8rx, MINI-mr5h-rc2g-8v42, OESA-2024-2341, RHSA-2024:10777, RHSA-2024:10834, RHSA-2024:10850, RHSA-2024:10858, RHSA-2024:10860, RHSA-2024:10961, RHSA-2024:10964, RHSA-2024:10966, RHSA-2024:10977, RHSA-2024:10982, RHSA-2024:10984, RHSA-2024:11001, RHSA-2024:11027, RHSA-2024:11028, RHSA-2024:11029, RHSA-2025:11047, RHSA-2025:12499, RHSA-2025:13269, RHSA-2025:13307, RHSA-2025:15124, RHSA-2025:15371, RLSA-2024:10834, RLSA-2024:10850, RLSA-2024:10858, RLSA-2024:10860, RLSA-2025:11047, UBUNTU-CVE-2024-49761

## What is CVE-2024-49761?

CVE-2024-49761 is a medium-severity denial of service vulnerability in ruby rexml, published on 28 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2024-49761?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pcs` | AlmaLinux:8 | All versions | 0.10.18-2.el8_10.6.alma.1 |
| `pcs-snmp` | AlmaLinux:8 | All versions | 0.10.18-2.el8_10.6.alma.1 |
| `ruby` | AlmaLinux:8 | All versions | 2.5.9-113.module_el8.10.0+3932+2d440da3 |
| `ruby` | AlmaLinux:8 | All versions | 3.1.5-144.module_el8.10.0+3933+43481280 |
| `ruby-bundled-gems` | AlmaLinux:8 | All versions | 3.1.5-144.module_el8.10.0+3933+43481280 |
| `ruby-default-gems` | AlmaLinux:8 | All versions | 3.1.5-144.module_el8.10.0+3933+43481280 |
| `ruby-devel` | AlmaLinux:8 | All versions | 2.5.9-113.module_el8.10.0+3932+2d440da3 |
| `ruby-devel` | AlmaLinux:8 | All versions | 3.1.5-144.module_el8.10.0+3933+43481280 |
| `ruby-doc` | AlmaLinux:8 | All versions | 2.5.9-113.module_el8.10.0+3932+2d440da3 |
| `ruby-doc` | AlmaLinux:8 | All versions | 3.1.5-144.module_el8.10.0+3933+43481280 |
| `ruby-irb` | AlmaLinux:8 | All versions | 2.5.9-113.module_el8.10.0+3932+2d440da3 |
| `ruby-libs` | AlmaLinux:8 | All versions | 2.5.9-113.module_el8.10.0+3932+2d440da3 |
| `ruby-libs` | AlmaLinux:8 | All versions | 3.1.5-144.module_el8.10.0+3933+43481280 |
| `rubygem-abrt` | AlmaLinux:8 | All versions | 0.3.0-4.module_el8.5.0+2625+ec418553 |
| `rubygem-abrt` | AlmaLinux:8 | All versions | 0.4.0-1.module_el8.9.0+3746+91b8233a |
| `rubygem-abrt-doc` | AlmaLinux:8 | All versions | 0.3.0-4.module_el8.5.0+2623+08a8ba32 |
| `rubygem-abrt-doc` | AlmaLinux:8 | All versions | 0.4.0-1.module_el8.10.0+3854+02eaa59a |
| `rubygem-bigdecimal` | AlmaLinux:8 | All versions | 1.3.4-113.module_el8.10.0+3932+2d440da3 |
| `rubygem-bigdecimal` | AlmaLinux:8 | All versions | 3.1.1-144.module_el8.10.0+3933+43481280 |
| `rubygem-bson` | AlmaLinux:8 | All versions | 4.3.0-2.module_el8.5.0+259+8cec6917 |
| `rubygem-bson` | AlmaLinux:8 | All versions | 4.3.0-2.module_el8.5.0+2625+ec418553 |
| `rubygem-bson` | AlmaLinux:8 | All versions | 4.3.0-2.module_el8.6.0+3170+4b08f9d4 |
| `rubygem-bson-doc` | AlmaLinux:8 | All versions | 4.3.0-2.module_el8.5.0+2625+ec418553 |
| `rubygem-bundler` | AlmaLinux:8 | All versions | 1.16.1-4.module_el8.10.0+3871+342e2c2f |
| `rubygem-bundler` | AlmaLinux:8 | All versions | 2.3.27-144.module_el8.10.0+3933+43481280 |
| `rubygem-bundler-doc` | AlmaLinux:8 | All versions | 1.16.1-4.module_el8.5.0+2625+ec418553 |
| `rubygem-did_you_mean` | AlmaLinux:8 | All versions | 1.2.0-113.module_el8.10.0+3932+2d440da3 |
| `rubygem-io-console` | AlmaLinux:8 | All versions | 0.4.6-113.module_el8.10.0+3932+2d440da3 |
| `rubygem-io-console` | AlmaLinux:8 | All versions | 0.5.11-144.module_el8.10.0+3933+43481280 |
| `rubygem-irb` | AlmaLinux:8 | All versions | 1.4.1-144.module_el8.10.0+3933+43481280 |
| `rubygem-json` | AlmaLinux:8 | All versions | 2.1.0-113.module_el8.10.0+3932+2d440da3 |
| `rubygem-json` | AlmaLinux:8 | All versions | 2.6.1-144.module_el8.10.0+3933+43481280 |
| `rubygem-minitest` | AlmaLinux:8 | All versions | 5.10.3-113.module_el8.10.0+3932+2d440da3 |
| `rubygem-minitest` | AlmaLinux:8 | All versions | 5.15.0-144.module_el8.10.0+3933+43481280 |
| `rubygem-mongo` | AlmaLinux:8 | All versions | 2.5.1-2.module_el8.5.0+2625+ec418553 |
| `rubygem-mongo-doc` | AlmaLinux:8 | All versions | 2.5.1-2.module_el8.5.0+2625+ec418553 |
| `rubygem-mysql2` | AlmaLinux:8 | All versions | 0.4.10-4.module_el8.5.0+259+8cec6917 |
| `rubygem-mysql2` | AlmaLinux:8 | All versions | 0.4.10-4.module_el8.5.0+2625+ec418553 |
| `rubygem-mysql2` | AlmaLinux:8 | All versions | 0.4.10-4.module_el8.6.0+3170+4b08f9d4 |
| `rubygem-mysql2` | AlmaLinux:8 | All versions | 0.5.3-3.module_el8.10.0+3854+02eaa59a |

Products: Netapp Ontap Tools, Ruby-Lang Rexml.

## How do I fix CVE-2024-49761?

Upgrade to a fixed version.

## Is CVE-2024-49761 being exploited?

There is no known exploitation of CVE-2024-49761 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-49761 and fix it if it is affected.

What it is: CVE-2024-49761 is a medium-severity denial of service vulnerability in ruby rexml, published on 28 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-49761 in the wild and no public exploit code.

Affected product: ruby rexml. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-49761/ (Markdown: https://insights.sbomify.com/CVE-2024-49761/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-49761
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-49761
- OSV: https://osv.dev/vulnerability/CVE-2024-49761

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-49761/
Summaries are generated and may contain mistakes; the official description above is the record.
