Unpatched Cacti zero-day turns four guest HTTP requests into command execution
A researcher published an exploit that uses guest access to store an SQL string in a Cacti setting, rewrite the poller table and make the server run an arbitrary command.
- Affected
- Cacti Core 1.2.31, the latest release, with the guest account enabled; no CVE has been assigned yet.
- Risk
- Command execution on the monitoring server, access to stored router and switch credentials, and the ability to suppress alerts.
- What to do
- Disable the Cacti guest account, restrict the web interface to internal networks and review the poller table for unexpected commands.
The exploit, named 4HTTP2SHELL and 4HTTP2ROOT, was published by a researcher going by ek0ms savi0r. It chains four failures: a guest can write text into the numeric preview_graphs_per_page setting via auth_profile.php, the stored value bypasses request validation, the PDO driver accepts stacked SQL statements through the LIMIT clause, and the poller (the component that regularly polls devices) passes a database-stored string to popen() unchecked. Loading graph_view.php triggers a second-order SQL injection that rewrites a poller row, and calling graph_realtime.php from the same guest session runs the command. watchTowr notes that Cacti often stores credentials for network gear, so a compromise gives attackers a foothold well beyond the monitoring server.
- No password, API key or phishing is needed, just four requests to pages available to guests
- Commands run as the user the Cacti server runs under
- Attackers can also tamper with poller entries to silence monitoring alerts
created 27 November at 12:56