Overview
A researcher using the alias "ek0ms savi0r" has published a proof-of-concept for an unpatched remote code execution flaw in Cacti, the open-source network monitoring tool. The exploit is tracked as 4HTTP2SHELL and 4HTTP2ROOT. It has no CVE identifier yet and no vendor fix at the time of reporting. watchTowr has also published an advisory and FAQ.
The reported path goes from an unauthenticated HTTP session to command execution as the Cacti server user in four requests, with no login, API key or phishing. The reported target is Cacti Core 1.2.31, the latest version when the story broke. The chain applies when the guest account is enabled.
How the Chain Works
According to the published details, the exploit combines a second-order SQL injection with an unsanitized command execution:
- The guest account writes a non-numeric string into the
preview_graphs_per_pagesetting throughauth_profile.php?action=update_data. Cacti does not check that the value is an integer. - The stored value is a SQL injection payload. It fires when
graph_view.phploads with default filters. - PHP's PDO driver accepts stacked statements through the SQL
LIMITclause, so the payload can run anUPDATEagainst a row in the poller table. graph_realtime.phpreads that row and passes its command value to PHP'spopen()with no allowlist or sanitization.
The researcher lists four enabling failures: a guest-writable numeric setting accepted as an arbitrary string, a stored default that bypasses request validation, stacked-statement support in the PDO driver, and a poller that executes a command string stored in the database.
Impact
- Compromise of the Cacti server as the web server user
- A pivot point into the monitored network, since Cacti often holds device credentials such as SNMP communities
- Possible suppression of alerts by altering the poller table
A public PoC exists. This article does not cover in-the-wild exploitation because the source does not report any.
What To Do Now
- Disable the guest account in Cacti. This is the main mitigation because the chain starts from guest access.
- Restrict access to the Cacti web interface to trusted management networks or put it behind a VPN or authenticating reverse proxy.
- Review poller configuration entries for unexpected command values.
- Rotate monitored-device credentials stored in Cacti if you find signs of tampering.
- Watch the Cacti project and your distribution for a fix, and apply it when released.