A newly disclosed zero-day vulnerability in Cacti, the widely used open-source network monitoring platform, has been shown to enable unauthenticated remote code execution under certain configurations. Security researcher "ek0ms savi0r" revealed a proof-of-concept exploit chain, dubbed 4HTTP2SHELL and 4HTTP2ROOT, that can compromise a vulnerable Cacti server in as few as four HTTP requests.
According to the researcher, the attack requires no authentication credentials, API keys, social engineering, or prior access. Instead, it leverages the application's default guest-access functionality to progress from an unauthenticated session to command execution on the underlying server.
The flaw impacts Cacti Core 1.2.31, currently the latest release, when guest access is enabled. Although guest accounts have been disabled by default since version 0.8.7, environments that still allow guest access remain exposed to exploitation.
At the center of the issue is a configuration setting named "preview_graphs_per_page," which controls the number of graphs displayed in Preview Mode. Researchers found that attackers can manipulate this parameter through the endpoint auth_profile.php?action=update_data, injecting non-numeric values into a field that is intended to accept only integers. Because the input is not properly validated, malicious SQL content can be stored within the application.
This weakness can then be escalated into a second-order SQL injection attack. When a victim loads the graph preview page using default filtering options, the previously stored malicious input is processed by the application, allowing arbitrary SQL queries to be executed against the backend database.
The proof-of-concept demonstrates the use of an SQL UPDATE statement to alter entries in Cacti's poller table. Once those database records are modified, a final request to the graph_realtime.php endpoint triggers the real-time poller process. During execution, Cacti retrieves the attacker-controlled value from the database and passes it directly to PHP's popen() function without sufficient validation, sanitization, or command restrictions, ultimately resulting in remote command execution on the host.
The exploit chain succeeds because of a combination of security weaknesses:
- Guest users can store arbitrary string values in a field intended to accept numeric input.
- Persisted default values circumvent expected validation controls.
- Cacti's PHP PDO implementation permits stacked SQL statements through the LIMIT clause.
- The polling mechanism executes command strings retrieved from the database without proper safeguards.
A successful attack could give threat actors complete control over the monitoring server, allowing them to execute arbitrary commands, manipulate monitoring operations, suppress alerts, and potentially move laterally throughout the environment.
The risk extends beyond the Cacti server itself. Because network monitoring platforms frequently hold administrative credentials, SNMP community strings, device access information, and connection details for infrastructure assets such as routers, switches, firewalls, and servers, a compromised Cacti deployment can serve as a launching point for broader attacks across the network.
Security researchers warn that attackers gaining command execution on a monitoring platform may be able to harvest sensitive credentials, access connected systems, weaken visibility by altering monitoring configurations, or establish persistence within enterprise environments.
Until an official patch becomes available, administrators are strongly encouraged to disable guest access wherever possible, limit exposure of the Cacti web interface to trusted users and management networks, and audit poller table entries for unusual or unauthorized command values. Organizations should also closely monitor vendor advisories and deploy remediation updates immediately once fixes are released.
Found this article interesting? Follow us on X(Twitter) ,Threads and FaceBook to read more exclusive content we post.
