CVE-2024-42361 GHSL-2023-256: HertzBeat Authenticated (guest role) SQL injection in /api/monitor/{monitorId}/metric/{metricFull}
An authenticated guest user can execute arbitrary SQL queries via the metric download endpoint, potentially reading or modifying database contents.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-42361?
CVE-2024-42361 is a high-severity SQL injection vulnerability in Apache HertzBeat, published on 20 Aug 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Hertzbeat is an open source, real-time monitoring system. Hertzbeat 1.6.0 and earlier declares a /api/monitor/{monitorId}/metric/{metricFull} endpoint to download job metrics. In the process, it executes a SQL query with user-controlled data, allowing for SQL injection.
Weakness: CWE-89
Which versions are affected by CVE-2024-42361?
It affects 1 product.
Products include Apache Hertzbeat.
How do I fix CVE-2024-42361?
No fix has been published for CVE-2024-42361 yet. Limit exposure of the affected software until one is available.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2024-42361 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-42361 exists.
Other vulnerabilities in Apache HertzBeat
- CVE-2023-51388 HertzBeat AviatorScript Inject RCE
- CVE-2023-51389 HertzBeat SnakeYAML Deser RCE
- CVE-2023-51653 Hertzbeat JMX JNDI RCE
- CVE-2026-24343 Apache HertzBeat: Uncontrolled Resource Consumption via Crafted XPath Expressions
- CVE-2025-24404 Apache HertzBeat (incubating): RCE by parse http sitemap xml response