
A researcher using the handle “ek0ms savi0r” has published details of a new, unpatched remote code execution flaw in Cacti, the open-source tool many organisations use to graph the health of routers, switches and servers. The attack, tracked as 4HTTP2SHELL and 4HTTP2ROOT, needs no login and no API key: according to the researcher, four HTTP requests against the guest surface are enough to run commands on the Cacti server. The researcher tested it against Cacti Core 1.2.31 on an isolated lab host with the guest account enabled. As of November 27, watchTowr says no CVE has been assigned, no exploitation in the wild has been reported, and no fixed version has been confirmed. The Hacker News notes the guest account has been disabled by default since Cacti 0.8.7, and watchTowr says the whole chain runs through the guest session, so it matters only where the account is enabled.
The mechanism, as described by The Hacker News and watchTowr, is a second-order SQL injection. A guest can write non-numeric text into a per-user display setting called preview_graphs_per_page, and Cacti later pastes that stored value into a database query that accepts stacked statements. That lets the guest change a stored poller entry into a shell command; a guest-reachable page that runs the realtime poller then passes it to PHP’s popen() function. The researcher says the commands run as whichever account the Cacti web server and poller use, often a low-privileged web user such as www-data or apache (it was root in the lab). That still matters, because Cacti commonly stores SNMP strings and device logins for the equipment it monitors, so watchTowr warns an attacker could gain a foothold well beyond the monitoring server.
How to check if you’re affected
Affected versions are Cacti Core 1.2.31, which was the latest release listed on Cacti’s GitHub releases page when we checked, and only where the guest account is enabled. No fixed version exists yet. With no vendor advisory, this is watchTowr’s guidance:
- Disable the guest account in Cacti’s user administration settings; this removes the entry point the chain relies on.
- Restrict the Cacti web interface to trusted internal networks.
- Review poller configuration entries for command values that do not match your normal polling setup, and look for files the poller process created unexpectedly.
- Check application logs for warnings about a non-numeric value in a graph display setting; watchTowr says the chain produces these even though the request succeeds.
- Install the fixed Cacti Core release when one is published.
watchTowr sells exposure-management software and its write-up describes using that platform to find affected Cacti instances for its clients. We have not seen a response from the Cacti project in these sources. We are deliberately not linking the researcher’s public proof-of-concept.
Sources
- watchTowr: 4HTTP2ROOT FAQ, Cacti zero-day exposure and fix
- The Hacker News: Unpatched Cacti zero-day enables RCE in just four HTTP requests via guest access
- Cacti releases on GitHub (1.2.31 shown as the latest release at the time of writing)
