CVE-2025-58767 — rexml
Fix: ruby/rexml@5859bdeCVE-2025-58767 is a Uncontrolled Resource Consumption vulnerability in rexml. A fix is available for rexml — see the affected versions and patch details below.
REXML has a DoS condition when parsing malformed XML file
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-58767.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
rexmlReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
Impact
The REXML gems from 3.3.3 to 3.4.1 have a DoS vulnerability when parsing XML containing multiple XML declarations. If you need to parse untrusted XMLs, you may be impacted to these vulnerabilities.
Patches
REXML gems 3.4.2 or later include the patches to fix these vulnerabilities.
Workarounds
Don't parse untrusted XMLs.
References
- https://www.ruby-lang.org/en/news/2025/09/18/dos-rexml-cve-2025-58767/ : An announcement on www.ruby-lang.org
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | rexml | ≥ 3.3.3&&< 3.4.2 | 3.4.2bundle update rexml --conservative |
Affected Products
rexmlruby-langDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rexml, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update rexml to 3.4.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-58767 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Product Security team has rated this vulnerability as having the 'Moderate' severity, with the final CVSSv3.1 score of 5.3 as the final impact in availability is restricted to the application consuming the REXML package and not the whole system.
The primary mitigation for this flaw is to avoid parsing XML documents originating from untrusted, unauthenticated, or unverified sources.Source: Red Hat security advisory for CVE-2025-58767 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 10 | ruby-0:3.3.10-11.el10_1 | RHSA-2025:23141 |
| Red Hat Enterprise Linux 10.0 Extended Update Support | ruby-0:3.3.10-11.el10_0 | RHSA-2025:23927 |
| Red Hat Enterprise Linux 8 | ruby:3.3-8100020251124151715.489197e6 | RHSA-2025:23062 |
| Red Hat Enterprise Linux 9 | ruby:3.3-9070020251113101221.9 | RHSA-2025:23063 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | ruby:3.3-9040020251203142310.9 | RHSA-2025:23140 |
| Red Hat Enterprise Linux 9.6 Extended Update Support | ruby:3.3-9060020251210162455.9 | RHSA-2025:23648 |
Frequently Asked Questions
Is CVE-2025-58767 in your dependencies?
Find it across RubyGems, including transitive dependencies.