CVE-2024-31445 SQL Injection vulnerability in automation_get_new_graphs_sql
Authenticated users can exploit SQL injection in Cacti to achieve privilege escalation and remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-31445?
CVE-2024-31445 is a high-severity SQL injection vulnerability in Cacti Cacti, published on 13 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Cacti provides an operational monitoring and fault management framework. Prior to version 1.2.27, a SQL injection vulnerability in `automation_get_new_graphs_sql` function of `api_automation.php` allows authenticated users to exploit these SQL injection vulnerabilities to perform privilege escalation and remote code execution. In `api_automation.php` line 856, the `get_request_var('filter')` is being concatenated into the SQL statement without any sanitization. In `api_automation.php` line 717, The filter of `'filter'` is `FILTER_DEFAULT`, which means there is no filter for it. Version 1.2.27 contains a patch for the issue.
Weakness: CWE-89
Which versions are affected by CVE-2024-31445?
It affects 2 products.
Products include Cacti Cacti, Fedoraproject Fedora.
How do I fix CVE-2024-31445?
Upgrade to a fixed version.
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-31445 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-31445 exists.
Other vulnerabilities in Cacti Cacti
- CVE-2022-46169 Cacti Command Injection
- CVE-2026-39893 Cacti: Pre-authentication SQL injection via rfilter RLIKE clause in graph_view.php
- CVE-2026-39938 Cacti: Unauthenticated RCE on Graph Image
- CVE-2026-39955 Cacti has Pre-Authentication SQL Injection via unanchored FILTER_VALIDATE_REGEXP in graph_view.php
- CVE-2023-39361 Unauthenticated SQL Injection in graph_view.php in Cacti
Sources
Also known as CLEANSTART-2024-MN78256, DEBIAN-CVE-2024-31445, GHSA-vjph-r677-6pcc, UBUNTU-CVE-2024-31445.