Cacti patches SQL injection flaw targeted by 4HTTP2SHELL exploit
Fixes for Cacti 1.2.31 and later branches arrive after a public four-request exploit using the guest account drew probing attempts from 27 November.
- What happened
- Cacti released patches for a SQL injection flaw after a public exploit chain using the guest account drew attack attempts.
- What’s new
- Fixes now exist for the 1.2.31, 1.2.x and develop branches and will ship in Cacti 1.2.32.
- Why it matters
- Cacti servers store credentials for routers, switches and servers, so a compromise can reach well beyond the monitoring tool.
Cacti's maintainers have released fixes for a SQL injection vulnerability in the open source network monitoring tool, days after a public exploit chain named 4HTTP2SHELL (first published as 4HTTP2ROOT) drew attack attempts. According to SecurityWeek, Cacti announced on 28 November that patches are available for the 1.2.31, 1.2.x and develop branches and will ship in version 1.2.32. Cacti rates the flaw 8.8 on the CVSS scale, and no CVE identifier has been assigned yet, SecurityWeek reports.
How the flaw became unauthenticated
In Cacti's own description, as relayed by SecurityWeek, the bug lets a logged-in account with default Normal User permissions read and write the whole Cacti database, leading to administrator takeover and command execution on the server. DevOps engineer Amdadul Bari privately reported it on 19 November, SecurityWeek says.
On 26 November a researcher using the handle ek0ms savi0r posted an exploit on GitHub that removes the login requirement by going through Cacti's guest account, according to watchTowr. The security firm explains that an anonymous guest stores an unchecked value in a per-user display setting; Cacti later places that value into a database query that runs as several statements, one of which turns a poller setting into a shell command that another guest-reachable page executes. The chain takes four HTTP requests and was tested on Cacti Core 1.2.31.
The exploit only works where the guest account is turned on, and SecurityWeek notes that guest access has been off by default since Cacti 0.8.7. Previdian Research says the researcher achieved root-level execution in a lab where Cacti ran as root; on typical installs, commands would run with the privileges of the Cacti process. watchTowr warns that because Cacti holds credentials including SNMP strings and logins for network devices, a compromised server can give attackers a foothold far beyond the monitoring system.
Conflicting counts of attack attempts
watchTowr and Previdian both report exploitation activity beginning on 27 November. Previdian's own write-up records 22 SQL injection attempts from a single IP address against its Cacti honeypots, using time-based payloads that tested whether the flaw was exploitable, and says successful command execution had not been confirmed. SecurityWeek, however, reports that Previdian observed nearly 1,800 attempts. watchTowr says no attribution has been made public.
What administrators should do
watchTowr and Previdian, writing before the fix appeared, both advised disabling the guest account and limiting the web interface to trusted networks. Previdian also recommends making sure Cacti's processes do not run as root, checking for unexpected changes to user settings and polling configuration, and rotating stored device credentials if compromise is suspected. watchTowr suggests checking Cacti's logs for alerts that a graph display setting received a non-numeric value, a trace the exploit chain leaves behind. With patches now out, administrators running 1.2.31 can apply the fixed branches or move to 1.2.32 when it is released.