A newly discovered zero-day vulnerability in Cacti, a popular open-source tool for network monitoring, poses a significant security risk by allowing remote code execution with minimal effort. The vulnerability, termed 4HTTP2SHELL and 4HTTP2ROOT, can be exploited without authentication, making it particularly dangerous.
Exploit Details and Security Concerns
This critical flaw was highlighted by a security researcher known as “ek0ms savi0r,” who demonstrated that an attacker could execute commands on the Cacti server using just four HTTP requests. The exploit does not require login credentials, an API key, or phishing attempts, making it accessible to potential attackers.
The vulnerability impacts Cacti Core 1.2.31, the latest version available, specifically when the guest account feature is active. Attackers can manipulate a setting called “preview_graphs_per_page” by injecting arbitrary SQL strings, leading to a second-order SQL injection vulnerability.
Technical Breakdown of the Vulnerability
The exploit involves writing non-numeric text into a configuration parameter via “auth_profile.php?action=update_data.” This setting determines how many graphs appear per page in preview mode. Since Cacti fails to validate input as integer values, attackers can execute arbitrary SQL queries when accessing the graph preview page with default filters.
In a detailed demonstration, “ek0ms savi0r” showed how an SQL UPDATE statement modifies records in Cacti’s poller table. Subsequently, invoking the real-time poller endpoint from the same guest session processes this data without proper checks, exploiting PHP’s popen() function.
Mitigation and Security Recommendations
The vulnerability arises from multiple failures in Cacti’s security mechanisms, including unchecked parameter writing, bypassed request validation, and the misuse of stacked SQL statements. If exploited, this flaw can compromise the Cacti server, exposing sensitive data and potentially allowing network-wide access.
Security experts advise users to disable the guest account and limit access to the Cacti web interface to mitigate these risks. Additionally, reviewing poller configuration entries for unauthorized commands is crucial. Users should apply any forthcoming patches immediately to secure their systems.
Given Cacti’s role in storing network credentials and connections for various devices, the implications of this vulnerability are far-reaching, emphasizing the urgent need for prompt action to protect affected systems.
