PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2024-31458: 
Cacti vulnerability analysis and mitigation

Overview

Cacti, an operational monitoring and fault management framework, was found to contain a SQL injection vulnerability (CVE-2024-31458) prior to version 1.2.27. The vulnerability exists in the form_save() function in graph_template_inputs.php where data is not thoroughly checked and is used to concatenate SQL statements in the draw_nontemplated_fields_graph_item() function from lib/html_form_templates.php (GitHub Advisory).

Technical details

The vulnerability stems from the column_name field in the graph_template_input SQL table, which is controllable through the form_save() function. While writing malicious data doesn't require administrator privileges, exploiting the vulnerability requires administrator access. The field length is limited to 50 characters. The attack vector involves the graph_edit() function in graphs.php, which calls draw_nontemplated_fields_graph_item(), where the $item variable is not properly sanitized before SQL concatenation. The vulnerability has been assigned a CVSS v3.1 base score of 4.6 (Medium) with vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L (GitHub Advisory).

Impact

The successful exploitation of this vulnerability could allow an attacker to perform SQL injection attacks, potentially leading to unauthorized data manipulation or deletion in the database. For example, an attacker could manipulate session data or perform other database operations (GitHub Advisory).

Exploitability

The vulnerability requires administrator privileges to exploit, though writing malicious data does not require such privileges. A proof of concept exists that demonstrates how an attacker can manipulate the column_name field to execute arbitrary SQL commands, such as deleting session data (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Cacti version 1.2.27. Users are advised to upgrade to this version or later to address the security issue. The fix includes proper input validation and sanitization of the affected parameters (GitHub Advisory, Fedora Update).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

cacti: 1.2.24+ds1-1+deb12u3

Fixed

bullseye

cacti: 1.2.16+ds1-2+deb11u4

Fixed

sid

cacti: 1.2.27+ds1-1

Fixed

trixie

cacti: 1.2.27+ds1-1

Fixed

Source: This report was generated using AI

Related Cacti vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-71287HIGH8.8
  • Cacti logoCacti
  • cacti
NoNoAug 05, 2026
CVE-2026-40083HIGH7.2
  • Cacti logoCacti
  • cacti
NoYesJun 25, 2026
CVE-2026-40941HIGH7.1
  • Cacti logoCacti
  • cacti
NoYesJun 25, 2026
CVE-2026-40084MEDIUM6.5
  • Cacti logoCacti
  • cacti
NoYesJun 25, 2026
CVE-2026-40082MEDIUM5.4
  • Cacti logoCacti
  • cacti
NoYesJun 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management