CVE-2024-43398: Rexml Denial of Service Vulnerability
HIGHCVE-2024-43398 is a HIGH (CVSS 5.9) denial of service vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) 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.6.
CVE-2024-43398 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-43398
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.
Upgrade rexml to 3.3.6
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-43398, 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.6), 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-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. 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
CVE-2024-43398 Affected Rexml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rexml
|
RubyGems |
< 3.3.6
|
3.3.6
|
References
Frequently Asked Questions
What is CVE-2024-43398?
Which Rexml versions are affected?
What version fixes CVE-2024-43398?
Is rexml affected?
What is the CVSS score of CVE-2024-43398?
What CWE is associated with CVE-2024-43398?
How can I check RubyGems dependencies for CVE-2024-43398?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vmwr-mc7x-5vc3",
"modified" : "2025-11-03T22:47:47Z",
"published" : "2024-08-22T16:40:46Z",
"aliases" : [ "CVE-2024-43398" ],
"summary" : "REXML denial of service vulnerability",
"details" : "### Impact\n\nThe REXML gem before 3.3.6 has a DoS vulnerability when it parses an XML that has many deep elements that have same local name attributes.\n\nIf you need to parse untrusted XMLs with tree parser API like `REXML::Document.new`, you may be impacted to this vulnerability. If you use other parser APIs such as stream parser API and SAX2 parser API, this vulnerability is not affected.\n\n### Patches\n\nThe REXML gem 3.3.6 or later include the patch to fix the vulnerability.\n\n### Workarounds\n\nDon't parse untrusted XMLs with tree parser API.\n\n### References\n\n* https://www.ruby-lang.org/en/news/2024/08/22/dos-rexml-cve-2024-43398/ : An announce on www.ruby-lang.org",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rexml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.3.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ruby/rexml/security/advisories/GHSA-vmwr-mc7x-5vc3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-43398"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rexml/commit/7cb5eaeb221c322b9912f724183294d8ce96bae3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ruby/rexml"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/rexml/releases/tag/v3.3.6"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rexml/CVE-2024-43398.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/01/msg00011.html"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20250103-0006"
}, {
"type" : "WEB",
"url" : "https://www.ruby-lang.org/en/news/2024/08/22/dos-rexml-cve-2024-43398"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-776" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-08-22T16:40:46Z",
"nvd_published_at" : "2024-08-22T15:15:16Z"
}
}