Unpatched Cacti 1.2.31 Zero-Day Gives Unauthenticated RCE

A public proof of concept chains guest access, SQL injection and popen() to run commands on Cacti 1.2.31 servers in four HTTP requests; no patch exists.
Table of Contents
    Add a header to begin generating the table of contents

    A researcher using the alias “ek0ms savi0r” has published a working proof of concept that gives an unauthenticated attacker remote code execution on Cacti Core 1.2.31, the latest release, in four HTTP requests. No patch is available and no CVE identifier has been assigned, leaving administrators of exposed monitoring servers to rely on configuration changes.

    What the 4HTTP2SHELL and 4HTTP2ROOT Exploit Requires

    The exploit is tracked under the names 4HTTP2SHELL and 4HTTP2ROOT. watchTowr has also published an advisory describing the flaw. According to the published details, the attack needs no login, no API key and no phishing. It relies only on the default guest surface of the application.

    That condition limits the exposure. The guest account has been disabled by default since Cacti 0.8.7, so a server is vulnerable to this chain only if an administrator has enabled it. Any internet-reachable Cacti 1.2.31 instance with the guest account turned on is within scope.

    Second-Order SQL Injection Through preview_graphs_per_page

    The chain begins with a guest session writing a non-numeric value into the “preview_graphs_per_page” setting through auth_profile.php?action=update_data. Cacti does not validate that value as an integer. When graph_view.php later loads with its default filters, the stored value is used in a database query, turning the stored text into a second-order SQL injection.

    The injected SQL UPDATE modifies a row in the poller table. That table controls what the Cacti poller runs, which makes it the bridge between a database write and command execution.

    From the Poller Table to popen() Command Execution

    The final step runs through graph_realtime.php. The script reads the modified poller row and passes its contents to the PHP popen() function with no allowlist. The result is command execution as the user account that runs the Cacti server.

    Because the chain stitches together a settings write, a query and a command call, no single step looks dramatic on its own. Each stage depends on missing input validation or an unchecked handoff, a combination that tends to survive code review because the individual functions behave as written.

    Why a Compromised Cacti Server Reaches Further Into the Network

    Cacti is a network monitoring and graphing tool, and monitoring servers often store credentials for the routers, switches and servers they poll. A compromised Cacti host therefore offers an attacker a pivot into the wider network, not only a foothold on a single machine.

    The poller table also gives an attacker a way to interfere with visibility. According to the published analysis, an attacker could suppress alerts by editing the poller table, which would reduce the chance that the monitoring platform itself reports an intrusion.

    Mitigation Options While No Cacti Patch Exists

    The Cacti project has not released a fix for the flaw. The mitigation guidance accompanying the disclosure is limited to configuration and review steps:

    • Disable the guest account
    • Restrict access to the web interface
    • Review poller entries for unexpected commands
    • Apply a patch when one is released

    Of these, disabling the guest account removes the entry point the chain depends on. Restricting web interface access narrows who can reach the vulnerable pages at all, and the poller review addresses the possibility that a server was already modified.

    Why Default-Off Guest Access Limits but Does Not Remove the Risk

    The long-standing default of a disabled guest account means the exploit will not work against every Cacti deployment. Still, administrators sometimes enable guest access to share graphs with users who lack accounts, and those deployments now carry a publicly documented path to root-level impact on the host, based on the researcher’s naming of the chain as 4HTTP2ROOT.

    The disclosure also arrives before a CVE identifier or a vendor fix, which means scanners and vulnerability management tools that key on CVE numbers will not flag the issue yet. Organizations that run Cacti 1.2.31 will need to check their guest-account setting manually rather than wait for an automated alert.

    The public availability of a proof of concept shortens the window in which defenders can act. With the exploit steps documented and no update available, the practical safeguards remain the ones the advisory lists, and the next development to watch is whether the Cacti project issues a release that validates the preview_graphs_per_page value as an integer and removes the unchecked popen() call path.

    Related Posts