Ethical Hacking News
Unpatched vulnerability in Cacti network monitoring tool allows for unauthenticated remote code execution via guest access. Learn more about the vulnerability, its potential impact, and how to mitigate it.
Cacti version 1.2.31 has a vulnerability that allows remote code execution via guest access. The vulnerability can be exploited by writing an unvalidated value into the "preview_graphs_per_page" setting. The vulnerability can lead to arbitrary SQL query execution and potential command execution. Successful exploitation can allow attackers to compromise the Cacti server and gain a foothold in the network. Users are advised to disable guest accounts and restrict web interface access to mitigate potential risks.
A recent discovery has shed light on a previously unknown vulnerability in the open-source network monitoring tool Cacti, which could be exploited by an attacker to achieve remote code execution within just four HTTP requests via guest access. The vulnerability, discovered by a security researcher using the handle "ek0ms savi0r," affects the latest version of Cacti Core 1.2.31 on an isolated host when the guest account is enabled.
According to "ek0ms savi0r," the vulnerability allows an attacker to abuse the guest access to write an unvalidated value into a setting called "preview_graphs_per_page" via "auth_profile.php?action=update_data." This configuration parameter controls how many graphs are displayed per page when viewing graphs in Preview Mode. The crafted value takes the form of arbitrary SQL strings that can be turned into a second-order SQL injection by taking advantage of the fact that Cacti does not validate that the user-provided input is actually an integer value.
This, in turn, opens the door for arbitrary SQL query execution when the graph preview page ("graph_view.php") is loaded with default filters. The SQL query demonstrated by "ek0ms savi0r" is an UPDATE statement to modify a record in Cacti's poller table. In the final stage of the attack, the realtime poller endpoint ("graph_realtime.php") is invoked from the same guest session, which causes the modified row from the poller table to be read and passed as input to PHP's popen() function without any allowlist or sanitization checks.
The researcher has pointed to four failures that ultimately make it possible to achieve unauthenticated remote code execution. These failures include the guest can write a numeric setting as an arbitrary string, the stored default bypasses request validation, Cacti's PHP PDO database driver accepts stacked statements through the SQL LIMIT clause, and the poller executes a database-stored command string.
Successful exploitation of the flaw can allow an attacker to compromise the Cacti server and provide a pivot point to the target network, exposing sensitive data, or even suppress alerts by modifying the poller table. "Because Cacti often stores credentials and connection details for routers, switches, servers, and other devices across a network, an attacker who reaches this level of command execution can gain a foothold reaching far beyond the monitoring server itself," watchTowr said in an advisory.
In the absence of a fix, users are advised to disable the guest account and restrict access to the Cacti web interface to mitigate potential risks. It's also essential to review poller configuration entries for unexpected command values and apply the fixes as soon as they become available.
Related Information:
https://www.ethicalhackingnews.com/articles/A-Critical-Unpatched-Vulnerability-in-Open-Source-Network-Monitoring-Tool-Cacti-Exposes-Remote-Code-Execution-via-Guest-Access-ehn.shtml
https://thehackernews.com/2026/11/unpatched-cacti-zero-day-enables-rce-in.html
Published: Fri Nov 27 00:49:00 2026 by llama3.2 3B Q4_K_M