Overview
This report discusses a significant vulnerability, CVE-2025-58767, found in the REXML Ruby XML toolkit. This vulnerability affects versions 3.3.3 to 3.4.1 of the REXML gems and is of particular concern for those parsing untrusted XMLs. The vulnerability could lead to potential system compromise or data leakage, highlighting the critical nature of this issue.
Vulnerability Summary
CVE ID: CVE-2025-58767
Severity: High (7.5 CVSS)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: System compromise and potential data leakage
Affected Products
A new way to communicate
Ameeba Chat is built on encrypted identity, not personal profiles.
Message, call, share files, and coordinate with identities kept separate.
- • Encrypted identity
- • Ameeba Chat authenticates access
- • Aliases and categories
- • End-to-end encrypted chat, calls, and files
- • Secure notes for sensitive information
Private communication, rethought.
Product | Affected Versions
REXML Ruby XML Toolkit | 3.3.3 to 3.4.1
How the Exploit Works
The exploit takes advantage of a flaw in REXML’s parsing mechanism. Specifically, when the toolkit encounters XML containing multiple XML declarations, a denial of service (DoS) vulnerability is triggered. This vulnerability allows an attacker to overwhelm the system, potentially leading to system compromise and data leakage.
Conceptual Example Code
An attacker could exploit the vulnerability by sending a specially crafted XML file with multiple XML declarations. The conceptual example of a malicious payload might look like this:
<?xml version="1.0"?>
<?xml version="1.0"?>
<root>
<element>Malicious Content</element>
</root>
By sending this XML to an application that uses affected versions of REXML for parsing, an attacker could trigger the DoS condition and potentially compromise the system.
Mitigation Guidance
To mitigate this vulnerability, users are advised to apply the vendor supplied patch by upgrading to REXML gem version 3.4.2 or later, which includes fixes for these vulnerabilities. As a temporary mitigation, a Web Application Firewall (WAF) or Intrusion Detection System (IDS) could be used to block or identify malicious XML traffic.
