ek0ms savi0r chains Cacti guest access to unauthenticated RCE
A security researcher using the alias "ek0ms savi0r" published a proof-of-concept that runs from a fresh, unauthenticated HTTP session to command execution as the Cacti server user in four HTTP requests. No login, no API key, no phishing. The target is Cacti Core 1.2.31, the current release, running on an isolated host with the guest account enabled. There is no CVE yet; the PoC is tracked as…
A security researcher, going by the handle "ek0ms savi0r," has demonstrated a proof-of-concept that allows arbitrary command execution on a Cacti server with just an unauthenticated HTTP session. The vulnerability exists in Cacti Core 1.2.31, the most recent release, and only requires the guest account to be enabled.
The attack chain involves four HTTP requests. The first targets the auth_profile.php?action=update_data endpoint, where the guest can write an arbitrary string to the preview_graphs_per_page setting, despite Cacti not validating if the value is numeric. This injected text is a SQL fragment, stored safely until needed. When the graph preview page graph_view.php loads with default filters, Cacti unwittingly incorporates the stored value into a query, marking the beginning of a second-order SQL injection.
The researcher's payload is an UPDATE statement against Cacti's poller table, which becomes possible because Cacti's PHP PDO driver accepts stacked statements through the SQL LIMIT clause. The poller table is critical, as Cacti pulls command strings from the database and executes them. The final request in the chain is graph_realtime.php, which reads the attacker-modified row from the poller table and passes it to PHP's popen() function without any allowlist or sanitization, allowing the command to run as the Cacti server user.
The implications are severe. WatchTowr's advisory highlights that Cacti stores credentials and connection details for the devices it polls, meaning an attacker could gain a pivot into the rest of the network with code execution on the Cacti server. Additionally, the same write primitive enables an attacker to suppress alerts by editing rows in the poller table.
For now, there is no patch available. However, the recommended course of action is to disable the guest account and restrict access to the Cacti web interface, ensuring it is not reachable from untrusted networks. Reviewing poller configuration entries for command values that do not belong to legitimate users is also advised, as anyone who has executed this attack leaves behind modified rows. Finally, once a patch is released, it should be promptly applied.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to