On 26 November, a researcher published details and proof-of-concept code on GitHub for an unpatched flaw in Cacti, the open-source network monitoring and graphing tool. watchTowr has named it 4HTTP2ROOT; some reports call it 4HTTP2SHELL.
What the flaw does
The bug is a second-order SQL injection. An attacker who can reach the Cacti web interface sends four HTTP requests as the guest user. The Cacti poller then runs the attacker’s commands on the server.
The commands run with the rights of the account behind Cacti’s web server and poller. On many installs that is a low-privileged account such as www-data, but some installs run Cacti as root.
Who is affected
- Cacti 1.2.31 with guest access enabled. It is the only version confirmed so far, but other versions have not been ruled out.
- Guest access is off by default. Some administrators turn it on so that staff can view graphs without logging in.
How serious is the risk
There is no CVE, no CVSS score and no vendor patch yet. As of 27 November, no attacks had been reported and the flaw was not on CISA’s Known Exploited Vulnerabilities catalogue. Public exploit code usually shortens that window.
Cacti servers store SNMP community strings and device logins for routers, switches and firewalls. A compromised Cacti server can give an attacker a map of your network and the credentials to reach it.
What to do
- Turn off guest access. Set the guest user to “No User” in Cacti’s authentication settings, and disable the guest account under Console > Configuration > Users. Check from a fresh browser session that guest viewing no longer works.
- Restrict the web interface to your management network or VPN. Turning off guest access does not fix the underlying bug.
- Run Cacti under a non-root account where it is currently running as root.
- Look for warning signs: unexpected changes to user settings or poller entries, and unusual processes started by the web server or poller.
- If you suspect compromise, isolate the server, rotate the SNMP and device credentials stored in Cacti, and rebuild it.
- Apply the official fix as soon as the Cacti project releases one.
Sources: watchTowr: 4HTTP2ROOT FAQ; GBHackers: Cacti 4HTTP2ROOT zero-day; InfoSec Monkey: Cacti zero-day check, mitigate, hunt.