CVE-2024-39908: Rexml Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-4xqq-m2hx-25v8
CVSS 4.3
CWE-400
Published
Advisory Summary

CVE-2024-39908 is a MODERATE (CVSS 4.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Rexml libraries in the RubyGems ecosystem. The issue involves rexml denial of service vulnerability. Remediation is available by upgrading affected packages to version 3.3.2.

CVE-2024-39908 at a Glance

CVE Identifier CVE-2024-39908
GHSA Identifier GHSA-4xqq-m2hx-25v8
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Rexml
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-39908

To remediate this vulnerability, upgrade all affected Rexml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

rexml fixed: 3.3.2
Upgrade rexml to 3.3.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for rexml

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-39908, inspect your project dependencies for Rexml:

inspect dependencies for rexml

Analyze the terminal output to locate any version of Rexml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Rexml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The REXML gem before 3.3.1 has some DoS vulnerabilities when it parses an XML that has many specific characters such as `<`, `0` and `%>`. If you need to parse untrusted XMLs, you may be impacted to these vulnerabilities. ### Patches The REXML gem 3.3.2 or later include the patches to fix these vulnerabilities. ### Workarounds Don't parse untrusted XMLs. ### References * https://github.com/ruby/rexml/security/advisories/GHSA-vg3r-rm7w-2xgh : This is a similar vulnerability * https://www.ruby-lang.org/en/news/2024/07/16/dos-rexml-cve-2024-39908/

CVE-2024-39908 Affected Rexml Versions

1 component(s)
Fixed Versions:
3.3.2
Product / Package Ecosystem Affected Versions Fixed Version
rexml
RubyGems
< 3.3.2
3.3.2

References

Frequently Asked Questions

What is CVE-2024-39908?
CVE-2024-39908 is a security vulnerability in Rexml involving REXML denial of service vulnerability under CWE-400: Uncontrolled Resource Consumption.
Which Rexml versions are affected?
Affected versions include releases prior to 3.3.2 across affected packages: rexml.
What version fixes CVE-2024-39908?
Upgrading to 3.3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rexml affected?
Yes, rexml is affected in releases prior to 3.3.2. Upgrade your dependency to 3.3.2 or later.
What is the CVSS score of CVE-2024-39908?
CVE-2024-39908 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-39908?
CVE-2024-39908 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check RubyGems dependencies for CVE-2024-39908?
Run the dependency tree command: 'inspect dependencies for rexml'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4xqq-m2hx-25v8",
  "modified" : "2025-11-03T22:47:12Z",
  "published" : "2024-07-16T19:49:15Z",
  "aliases" : [ "CVE-2024-39908" ],
  "summary" : "REXML denial of service vulnerability",
  "details" : "### Impact\n\nThe REXML gem before 3.3.1 has some DoS vulnerabilities when it parses an XML that has many specific characters such as `<`, `0` and `%>`.\n\nIf you need to parse untrusted XMLs, you may be impacted to these vulnerabilities.\n\n### Patches\n\nThe REXML gem 3.3.2 or later include the patches to fix these vulnerabilities.\n\n### Workarounds\n\nDon't parse untrusted XMLs.\n\n### References\n\n* https://github.com/ruby/rexml/security/advisories/GHSA-vg3r-rm7w-2xgh : This is a similar vulnerability\n* https://www.ruby-lang.org/en/news/2024/07/16/dos-rexml-cve-2024-39908/",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rexml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ruby/rexml/security/advisories/GHSA-4xqq-m2hx-25v8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39908"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ruby/rexml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/rexml/releases/tag/v3.3.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rexml/CVE-2024-39908.yml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/01/msg00011.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250117-0008"
  }, {
    "type" : "WEB",
    "url" : "https://www.ruby-lang.org/en/news/2024/07/16/dos-rexml-cve-2024-39908"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-16T19:49:15Z",
    "nvd_published_at" : "2024-07-16T18:15:08Z"
  }
}