Unpatched Cacti Zero-Day Enables RCE in Just Four HTTP Requests via Guest Access

A new zero-day vulnerability in Cacti, tracked as 4HTTP2SHELL and 4HTTP2ROOT, allows unauthenticated remote code execution on the latest version 1.2.31 when the guest account is enabled. The proof-of-concept exploit chain requires only four HTTP requests starting from a fresh unauthenticated session, abusing the guest surface without any login or API key. The flaw stems from missing input validation on the preview_graphs_per_page setting, enabling second-order SQL injection that leads to command execution via the realtime poller endpoint. Researcher ek0ms savi0r demonstrated how arbitrary SQL strings bypass validation and are executed through PHP's popen() function after modifying the poller table. watchTowr highlighted that successful exploitation can compromise the monitoring server and provide a pivot into the broader network by exposing credentials for routers and switches. In the absence of a patch, users are advised to disable the guest account and restrict web interface access while monitoring poller configurations for unexpected commands.

The Hacker NewsTranslated from English

Read at source

A new zero-day vulnerability has been discovered in Cacti, an open-source network monitoring tool, that enables remote code execution through a minimal number of HTTP requests.

The proof-of-concept exploit, which has not yet received a CVE identifier, is tracked under the names 4HTTP2SHELL and 4HTTP2ROOT. Security researcher ek0ms savi0r stated that the chain starts from a fresh, unauthenticated HTTP session and reaches command execution as the Cacti server user in exactly four requests, with no login, valid API key, or phishing required.

The issue affects Cacti Core 1.2.31, the most recent version, on an isolated host when the guest account remains enabled. At a high level, an attacker can abuse guest access to write an unvalidated, non-numeric value into the setting named preview_graphs_per_page by calling auth_profile.php?action=update_data.

This parameter normally controls the number of graphs displayed per page in Preview Mode. Because Cacti fails to enforce that the supplied value is an integer, an attacker can insert arbitrary SQL strings that later trigger a second-order SQL injection when the graph preview page graph_view.php loads with default filters.

The demonstrated SQL query is an UPDATE statement targeting a record in the poller table. In the final step, the realtime poller endpoint graph_realtime.php is invoked from the same guest session, causing the modified row to be read and passed directly to PHP's popen() function without allowlist or sanitization checks.

The researcher identified four specific failures that enable unauthenticated remote code execution:

  • The guest account can write a numeric setting as an arbitrary string.
  • The stored default value bypasses request validation.
  • Cacti's PHP PDO database driver accepts stacked statements through the SQL LIMIT clause.
  • The poller executes a database-stored command string without verification.

Successful exploitation allows an attacker to fully compromise the Cacti server and use it as a pivot point into the target network. Because Cacti frequently stores credentials and connection details for routers, switches, servers, and other devices, command execution at this level can expose sensitive infrastructure far beyond the monitoring host itself, according to watchTowr.

Until an official fix is released, administrators are advised to disable the guest account, restrict access to the Cacti web interface, and regularly review poller configuration entries for unexpected command values.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in Vulns & Exploits

Docker Sandboxes Flaw Allows Malicious Kits to Exfiltrate AI API Keys Without User Prompts
OFFIS DCMTK Toolkit Hit by Critical Missing Authorization and Partial String Comparison Flaws
CISA Warns of Critical Vulnerabilities in Nextgen Healthcare Mirth Connect Allowing Arbitrary Script Execution and Man-in-the-Middle Attacks