CVE-2024-43398: ruby rexml · XML Entity Expansion
Affects ruby rexmlSource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium : upgrade to 3.3.6 when convenient.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 1.2% chance of exploitation in 30 days – higher than 68% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.3.6
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 22 Aug 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade ruby rexml to 3.3.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| ruby rexml | Affected
| Fixed in
|
AI-suggested
To mitigate CVE-2024-43398, European organizations should: 1) Upgrade all Ruby REXML gem instances to version 3.3.6 or later, which includes the official patch addressing this vulnerability. 2) Avoid using the REXML tree parser API (REXML::Document.new) for parsing untrusted XML inputs; instead, use safer alternatives such as the stream parser or SAX2 parser APIs, which are not affected. 3) Implement strict input validation and sanitization for all XML data received from untrusted or external sources to detect and reject maliciously crafted XML payloads with deep nesting or recursive entities. 4) Apply resource limits and timeouts on XML parsing operations to prevent excessive CPU or memory consumption. 5) Monitor application logs and performance metrics for signs of unusual resource usage indicative of attempted exploitation. 6) Educate developers and system administrators about the risks of XML entity expansion attacks and secure XML parsing practices. 7) Where feasible, consider using alternative XML parsing libraries with built-in protections against entity expansion attacks. These targeted measures go beyond generic advice by focusing on the specific vulnerable API usage and practical controls to limit attack surface.
Description
REXML is an XML toolkit for Ruby. The 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. If 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. The REXML gem 3.3.6 or later include the patch to fix the vulnerability.