CVE-2024-43398: REXML denial of service vulnerability
Impact
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.
Patches
The REXML gem 3.3.6 or later include the patch to fix the vulnerability.
Workarounds
Don't parse untrusted XMLs with tree parser API.
References
https://www.ruby-lang.org/en/news/2024/08/22/dos-rexml-cve-2024-43398/ : An announce on www.ruby-lang.org
Other sources
Admin Framework. A logic issue was addressed with improved checks.
— Apple
Admin Framework. The issue was addressed with improved checks.
— Apple
App Store. A logging issue was addressed with improved data redaction.
— Apple
Apple Account. A privacy issue was addressed with improved checks.
— Apple
Apple Neural Engine. The issue was addressed with improved memory handling.
— Apple
Credit
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/rexmlto a version that resolves this vulnerability.Fixed in 3.3.6 - Upgrade
Upgrade
debian/ruby2.7to a version that resolves this vulnerability.Fixed in 2.7.4-1+deb11u5 - Upgrade
Upgrade
debian/ruby3.3to a version that resolves this vulnerability.Fixed in 3.3.8-2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 15.7.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 14.8.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 26.1 - Upgrade
Upgrade
REXML gemto a version that resolves this vulnerability.Fixed in 3.3.6 - Configuration
If you parse XML input, avoid using tree parser APIs such as REXML::Document.new on untrusted XML; the material notes this vulnerability applies to tree parser API usage and not to stream/SAX2 parser APIs.
REXML (Ruby XML toolkit) Use of tree parser API (e.g., REXML::Document.new) = Do not parse untrusted XMLs with tree parser API
Event History
Parent advisories
This vulnerability appears in the following advisories.
Peer vulnerabilities
Found alongside the following vulnerabilities.
- CVE-2025-43322
- CVE-2025-43337
- CVE-2025-43390
- CVE-2025-43468
- CVE-2025-43379
- CVE-2025-43469
- CVE-2025-43378
- CVE-2025-43478
- CVE-2025-43407
- CVE-2025-43446
- CVE-2025-43361
- CVE-2025-43423
- CVE-2025-43472
- CVE-2025-43394
- CVE-2025-43448
- CVE-2025-43395
- CVE-2025-43401
- CVE-2025-43292
- CVE-2025-43479
- CVE-2025-43382
- CVE-2025-43445
- CVE-2025-43481
- CVE-2025-43387
- CVE-2025-43420
- CVE-2025-43498
- CVE-2025-43348
- CVE-2025-43474
- CVE-2025-43396
- CVE-2025-43398
- CVE-2025-43510
- CVE-2025-43520
- CVE-2025-43413
- CVE-2025-43496
- CVE-2025-43494
- CVE-2025-43383
- CVE-2025-43385
- CVE-2025-43384
- CVE-2025-43377
- CVE-2025-43389
- CVE-2025-43410
- CVE-2025-43411
- CVE-2025-43405
- CVE-2025-43391
- CVE-2024-43398
- CVE-2024-49761
- CVE-2025-6442
- CVE-2025-43335
- CVE-2025-43408
- CVE-2025-43476
- CVE-2025-30465
- CVE-2025-43414
- CVE-2025-43499
- CVE-2025-43380
- CVE-2025-43477
- CVE-2025-43399
- CVE-2025-43336
- CVE-2025-43397
- CVE-2025-43409
- CVE-2025-43334
- CVE-2025-43412
- CVE-2025-43373
- CVE-2025-43372
- CVE-2025-43338
- CVE-2025-31199
- CVE-2025-6965
- CVE-2025-43471
- CVE-2025-46313
- CVE-2025-43455
- CVE-2025-43447
- CVE-2025-43462
- CVE-2025-43388
- CVE-2025-43466
- CVE-2025-43465
- CVE-2025-43497
- CVE-2025-43461
- CVE-2025-43426
- CVE-2025-43436
- CVE-2025-43381
- CVE-2025-43470
- CVE-2025-46315
- CVE-2025-43464
- CVE-2025-43507
- CVE-2025-43444
- CVE-2025-43467
- CVE-2025-43386
- CVE-2025-43424
- CVE-2025-43364
- CVE-2025-43506
- CVE-2025-43508
- CVE-2025-43393
- CVE-2025-46316
- CVE-2025-43493
- CVE-2025-43503
- CVE-2025-43502
- CVE-2025-43406
- CVE-2025-43404
- CVE-2025-43339
- CVE-2025-43500
- CVE-2025-43473
- CVE-2025-43351
- CVE-2025-43463
- CVE-2025-32462
- CVE-2025-53906
- CVE-2025-43480
- CVE-2025-43458
- CVE-2025-43430
- CVE-2025-43427
- CVE-2025-43443
- CVE-2025-43441
- CVE-2025-43435
- CVE-2025-43425
- CVE-2025-43440
- CVE-2025-43438
- CVE-2025-43457
- CVE-2025-43434
- CVE-2025-43433
- CVE-2025-43431
- CVE-2025-43432
- CVE-2025-43429
- CVE-2025-43421
- CVE-2025-43392
- CVE-2025-43402
Frequently Asked Questions
What is the severity of CVE-2024-43398?
CVE-2024-43398 has a severity rating of moderate, primarily due to its potential to cause a denial of service.
How do I fix CVE-2024-43398?
To fix CVE-2024-43398, upgrade the REXML gem to version 3.3.6 or later.
What is the impact of CVE-2024-43398?
CVE-2024-43398 can lead to a denial of service when parsing deeply nested XML with similar local name attributes.
Which versions of REXML are affected by CVE-2024-43398?
REXML gem versions prior to 3.3.6 are affected by CVE-2024-43398.
Can I use REXML for parsing untrusted XML data with CVE-2024-43398?
It is not recommended to use REXML for parsing untrusted XML data due to the risk posed by CVE-2024-43398.