Cacti guest access flaw enables remote code execution in four requests

An unpatched zero-day in Cacti Core 1.2.31 can let an attacker move from a fresh, unauthenticated HTTP session to command execution as the Cacti server user in only four requests. The issue affects isolated hosts when the guest account is enabled, and the published proof of concept is being tracked as 4HTTP2SHELL and 4HTTP2ROOT; it has not yet received a CVE identifier.
The researcher known as ek0ms savi0r described the path as requiring no login, valid API key or phishing. It targets Cacti's default guest-facing functionality rather than a privileged administrative workflow.
How the four-request path reaches command execution
The attack begins at auth_profile.php?action=update_data. A guest can write a non-numeric value into preview_graphs_per_page, a setting that determines the number of graphs displayed on each page in Preview Mode. Cacti does not validate that this user-supplied value is an integer.
The crafted value can contain arbitrary SQL strings. When graph_view.php is subsequently loaded with default filters, that stored value becomes a second-order SQL injection, allowing arbitrary SQL query execution. The demonstration uses an UPDATE statement to change a record in Cacti's poller table.
In the last stage, the attacker calls the realtime poller endpoint, graph_realtime.php, from the same guest session. That endpoint reads the modified poller row and passes the database-stored command string to PHP's popen() function without allowlist or sanitisation checks, resulting in command execution.
Four weaknesses combine into a high-impact risk
The exploit chain depends on four reported failures: guest users can write an arbitrary string to a numeric setting; the stored default bypasses request validation; Cacti's PHP PDO driver accepts stacked statements through the SQL LIMIT clause; and the poller executes a command string stored in the database.
That combination makes the exposure more serious than an isolated input-validation defect. Cacti is a network monitoring platform and can hold credentials and connection information for routers, switches, servers and other network devices. watchTowr warned that command execution on the monitoring server can provide a foothold beyond that host, expose sensitive data, or enable an attacker to suppress alerts by modifying the poller table.
Immediate mitigations for Cacti operators
No fix was available when the vulnerability details were published. Organisations using affected deployments should disable the guest account and restrict access to the Cacti web interface. They should also review poller configuration entries for unexpected command values.
The practical business implication is to treat Cacti guest access as an urgent exposure: remove it where possible, limit the management interface to trusted users and networks, investigate altered poller commands, and apply vendor fixes as soon as they are available.

