By Hamza Faisal

A zero-day in Cacti, the open-source network monitoring tool, lets an attacker run operating-system commands on the monitoring server without logging in. The flaw, disclosed on November 26 and dubbed 4HTTP2ROOT, needs just four HTTP requests against a Cacti install with guest access switched on — and there is no patch yet.

Security researcher ek0ms savi0r published the flaw with a working proof of concept, verified in a lab by independent researchers at Previdian. The Hacker News and Cyber Security News both reported the disclosure on November 27. No exploitation in the wild had been reported as of that morning — but the exploit code is public, so that window may not stay open long.

Four requests, no login

The attack chains together four small trust failures in Cacti's guest-facing pages. First, a visitor loads the guest profile page and picks up a live session cookie and a CSRF token. Second, the guest updates their own profile and writes raw text into a setting called preview_graphs_per_page — a field that is supposed to hold a number, but Cacti never checks that it actually is one.

Third, the guest opens the graph preview page. Cacti reads the stored setting back and glues it straight into a SQL LIMIT clause, without re-checking it. Because the database driver allows stacked statements, the extra SQL rewrites a row in the poller table, which tells Cacti how to collect monitoring data. Fourth, the guest calls the realtime graph endpoint, which starts the realtime poller. The poller reads the doctored row and hands its value to PHP's popen() function with no allowlist and no sanitisation. The database row the guest could write is the row the poller executes.

"I found a path from a fresh, unauthenticated HTTP session to command execution as the Cacti server user in four requests," the researcher wrote. "No login. No valid API key. No phishing. Just four HTTP requests against the default guest surface."

The flaw affects Cacti Core 1.2.31, the current release, on any host where the guest account is enabled. In the lab demo the chain landed a root shell, because the test web server ran as root.

Why a monitoring server is a prize target

Cacti is not just another web app. To do its job it holds the keys to the network: SNMP community strings and device credentials for the routers and switches it polls, plus a trusted position inside the management network. An attacker who owns the Cacti server can harvest those credentials and move sideways into the devices it monitors.

"In a lot of shops, the Cacti server is more valuable than the domain controller because it is trusted everywhere and audited by nobody," the researcher warned.

What to do now

There is no vendor fix yet, and no CVE identifier had been assigned at the time of writing. Until Cacti ships a patch, administrators should turn off the guest account, under Console, Configuration, Users, and remove the Guest User from the authentication settings. That single change blocks the demonstrated attack path, though it does not repair the underlying SQL injection.

Admins should also lock the Cacti web interface behind a VPN or a trusted management network, and check PHP logs for non-numeric value warnings on graph_view.php, a possible sign someone is probing the flaw. Suspected victims should rotate the network credentials Cacti stores and watch Cacti's GitHub page for the patch. Four requests is a very low bar — and with the exploit public, the time to close the guest door is now.