Friday 27 November 2026
Security

Public exploit gives unauthenticated code execution on Cacti in four requests

A GitHub PoC chains guest account access, a SQL injection, and Cacti's realtime poller to run shell commands on 1.2.31; no patch is available.

Illustration: Cacti logo
Illustration: Five Nines

BleepingComputer reported on November 27 that a public exploit for an unpatched Cacti zero-day gives unauthenticated attackers remote code execution. Researcher ek0ms savi0r from the Church of Malware published the "4HTTP2SHELL" PoC on GitHub on Thanksgiving Day, showing how to reach a shell in four HTTP requests. The repository is named Sad Girls 0day Club, and includes a video demonstration. The researcher said the flaw was not reported to Cacti before release. The attack needs the guest account to be switched on, but the attacker does not need to log in with a real account. The PoC was tested on Cacti Core 1.2.31, but the researcher did not say whether earlier releases are also vulnerable. As of November 27, no attacks exploiting the vulnerability had been reported. Until a patch is available, BleepingComputer advises administrators to deactivate the guest account, limit access to the web interface, inspect poller settings for unexpected commands, and look for log warnings about non-numeric graph display values that could signal exploitation attempts.

The attack chain is laid out in the GitHub write-up. Cacti hands an unauthenticated visitor a guest session and a CSRF token from auth_profile.php. The profile update endpoint action=update_data accepts a setting name and value, and stores an arbitrary string in preview_graphs_per_page; the write-up says the setting is meant to be a page size but is not validated as an integer. When graph_view.php processes the stored default for the graphs filter, it inserts that value directly into the LIMIT part of the SQL query in get_allowed_graphs(). Because the database driver accepts multiple statements in one query, the attacker can run an extra UPDATE that changes poller_item.arg1 to a hex-encoded command. The last request to graph_realtime.php action=init starts the realtime poller, which takes the value from poller_item.arg1 and feeds it to popen(). The preview page loads normally, and the write-up notes that the application logs a PHP warning about a non-numeric value. In the researcher's lab, the web server and poller ran as root, so the exploit produced a root shell. On typical installations, the same process runs as the Cacti web user, often www-data or apache, limiting the privileges gained. The author calls the path "No login. No valid API key. No phishing. Just four HTTP requests against the default guest surface." The write-up notes the chain needs no memory corruption, deserialization gadget, or brute force. The author emphasizes that the attacker can change the very database entry that the poller later runs as a command. A compromised Cacti server is typically a jump box, holding SNMP community strings, device credentials, SSH keys, database credentials in include/config.php, and access to internal management networks.

Sources: GitHub, BleepingComputer

Noor Haddad

Noor Haddad covers attacks, breach disclosures and exploited vulnerabilities for Five Nines. Noor writes from CISA and vendor advisories, SEC disclosures and published reporting.

Corrections. Report an error to corrections@thefivenines.com. We list substantive corrections on the corrections page.