CVE-2025-24404 Overview
CVE-2025-24404 is an XML injection vulnerability in Apache HertzBeat (incubating) that can lead to remote code execution. The flaw exists in the HTTP sitemap XML response parsing logic. An authenticated attacker with access to add monitors can configure a monitor that parses attacker-controlled XML, triggering the parsing vulnerability through crafted response content.
Apache HertzBeat is an open-source real-time monitoring system. The vulnerability affects all versions before 1.7.0. The Apache HertzBeat project recommends upgrading to version 1.7.0, which contains the fix. The weakness is tracked under [CWE-91] (XML Injection).
Critical Impact
Authenticated attackers can trigger XML parsing of attacker-controlled responses, leading to remote code execution with full confidentiality, integrity, and availability impact on the HertzBeat server.
Affected Products
- Apache HertzBeat (incubating) versions before 1.7.0
- Deployments exposing the monitor configuration UI or API to authenticated users
- Self-hosted HertzBeat instances ingesting external HTTP sitemap XML responses
Discovery Timeline
- 2025-09-09 - CVE-2025-24404 published to NVD
- 2025-11-04 - Last updated in NVD database
Technical Details for CVE-2025-24404
Vulnerability Analysis
The vulnerability stems from unsafe XML parsing within HertzBeat's HTTP sitemap monitoring component. When an operator configures a monitor that parses HTTP responses as XML, the application processes the returned XML document without sufficient restrictions on external entities or injected XML constructs. An attacker who controls the target endpoint can return crafted XML that abuses the parser.
Because the monitored endpoint is attacker-controlled in this scenario, the attacker can choose exactly what XML payload the HertzBeat server processes. The Apache advisory describes the outcome as XML injection leading to remote code execution. Exploitation requires an authenticated account with permission to add monitors, but no user interaction is required once the monitor runs.
Successful exploitation grants the attacker the privileges of the HertzBeat process. This typically allows reading sensitive configuration, pivoting to internal services reachable from the monitoring host, and executing commands on the underlying operating system.
Root Cause
The root cause is improper handling of untrusted XML in the sitemap response parser. The parser does not adequately neutralize injected XML elements or external references in the data returned by the monitored HTTP target. This matches [CWE-91] XML Injection, where adversary-controlled content alters the structure or semantics of an XML document processed by the application.
Attack Vector
The attack is network-based and requires low-privileged authentication on the HertzBeat instance. An attacker performs the following high-level steps:
- Authenticate to HertzBeat with an account that can create monitors.
- Add a new HTTP monitor pointing to an attacker-controlled URL configured for XML sitemap parsing.
- Serve a crafted XML response from the attacker server when HertzBeat polls the endpoint.
- HertzBeat parses the response, triggering the injection and resulting code execution.
No verified public proof-of-concept exploit is listed for CVE-2025-24404. Refer to the Apache Mailing List Discussion and the OpenWall OSS Security Post for the original advisory details.
Detection Methods for CVE-2025-24404
Indicators of Compromise
- Newly created HTTP monitors in HertzBeat that point to unknown or external hosts and use XML sitemap parsing.
- Outbound HTTP requests from the HertzBeat host to attacker-controlled domains followed by unexpected child processes from the HertzBeat JVM.
- HertzBeat application logs containing XML parser errors, DOCTYPE declarations, or unusual entity references in monitored responses.
Detection Strategies
- Audit the HertzBeat monitor configuration database for entries created or modified by non-administrative users.
- Inspect HTTP egress from the HertzBeat server and alert on requests to domains not on a known-good allow list.
- Monitor the HertzBeat process tree for child processes such as sh, bash, cmd.exe, or scripting interpreters, which are not part of normal monitoring behavior.
Monitoring Recommendations
- Enable verbose application logging for the HTTP collector and forward logs to a centralized SIEM for correlation.
- Track authentication events and privilege changes on the HertzBeat console to identify abuse of accounts permitted to add monitors.
- Baseline normal outbound traffic from the HertzBeat host and alert on deviations, including DNS lookups for newly observed domains.
How to Mitigate CVE-2025-24404
Immediate Actions Required
- Upgrade Apache HertzBeat (incubating) to version 1.7.0 or later, which contains the official fix.
- Restrict console and API access so that only trusted administrators can create or modify monitors.
- Review existing monitors and remove any that point to untrusted external endpoints with XML parsing enabled.
Patch Information
The Apache HertzBeat project addressed CVE-2025-24404 in version 1.7.0. Upgrade details and the official notification are available in the Apache Mailing List Discussion. Operators running pre-release or incubating builds should redeploy from a clean 1.7.0 artifact rather than hot-patching in place.
Workarounds
- Disable or remove HTTP monitors that parse XML sitemap responses until the upgrade is applied.
- Place the HertzBeat server behind an egress proxy that restricts outbound HTTP to an allow list of trusted monitoring targets.
- Reduce the number of accounts with permission to add monitors, and rotate credentials for any account suspected of misuse.
# Example egress restriction using iptables to limit HertzBeat outbound HTTP/HTTPS
# Replace 203.0.113.10 with the IP of each legitimate monitoring target
iptables -A OUTPUT -m owner --uid-owner hertzbeat -d 203.0.113.10 -p tcp --dport 443 -j ACCEPT
iptables -A OUTPUT -m owner --uid-owner hertzbeat -p tcp --dport 80 -j REJECT
iptables -A OUTPUT -m owner --uid-owner hertzbeat -p tcp --dport 443 -j REJECT
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

