Skip to content
4http2shell

4http2shell

github.com • November 27, 2026

Cacti is one of those products that quietly owns the truth in a network. It sits in the monitoring layer, but the credentials it holds are not monitoring credentials. It talks to routers, switches, firewalls, Linux hosts, Windows boxes, PDUs, UPSes, and databases. It knows the SNMP strings. It knows the device logins. It knows where the backups live. In a lot of shops, the Cacti server is more valuable than the domain controller because it is trusted everywhere and audited by nobody.

That is why I spend time in it.

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

As we read on let us remember companies like Microslop, Amazon, alibaba, Huawei and many others use Cacti:

Cacti lets a guest write an arbitrary string into the per-user preview_graphs_per_page setting through auth_profile.php?action=update_data . That value is later read as the default for the graphs filter in graph_view.php and concatenated into the SQL LIMIT clause in get_allowed_graphs() . The request-side filter does not apply to the database-side default. PDO accepts stacked statements, so the guest can execute arbitrary UPDATE statements.

I used that write to change poller_item.arg1 to a shell command. Then I asked the guest-reachable graph_realtime.php?action=init endpoint to run the realtime poller. The poller reads poller_item.arg1 and passes it to popen() . Game over.

No memory corruption. No deserialization gadget. No brute force. Just a trust boundary that was never a boundary.

The target is current version Cacti Core 1.2.31 on an isolated lab host. The guest account was enabled. The web tier and poller ran as root in this lab; on a normal deployment the same chain runs as the Cacti web user, usually www-data or apache . The privilege of the shell depends on the deployment. The ability to get a shell does not.

Request 1: become the guest

Cacti hands a fresh visitor a guest session from auth_profile.php . No credentials are sent.

The response contains a valid session and a CSRF token:

This is the first place where a lot of people will stop and say "but it is only the guest account." The guest account is not the problem. What the guest account can write is the problem.

Request 2: write the payload

The profile update endpoint accepts a setting name and a value:

The endpoint stores the value in settings_user . The write itself is a prepared statement. That is the detail that makes this bug fun: the storage layer is safe, but the consumer is not. The value is a string that is later treated as part of a SQL statement.

preview_graphs_per_page is supposed to be a page size. It is not validated as an integer. The guest controls it.

Request 3: make the database execute it

graph_view.php?action=preview reads the stored default and builds the limit:

The relevant code path is:

The graphs value comes from the stored guest setting, not from the request. The request-side FILTER_VALIDATE_INT never sees the database default. The result is SQL that looks roughly like this:

PDO sends the whole string as a multi-statement query. The UPDATE executes. The HTTP response is still a normal preview page. There is no obvious error. The application logs a PHP warning a non-numeric value, but the request succeeds.

Request 4: run the command

The realtime poller is reachable from the same guest session:

That calls poller_realtime.php , which calls cmd_realtime.php , which reaches:

poller_item.arg1 is the command I wrote in request 2. popen() runs it through the shell. The HTTP response is a JSON object with a graph image; the command executes in the same request.

The same file was served back over HTTP from the Cacti webroot. That is not a side effect; it is the point. The web tier can write where the web tier reads.

There are four failures stacked on top of each other.

The guest can write a numeric setting as an arbitrary string. The profile endpoint checks that the setting name exists, but not that the value is a valid integer.

The guest can write a numeric setting as an arbitrary string. The profile endpoint checks that the setting name exists, but not that the value is a valid integer.

The stored default bypasses request validation. Request parameters are filtered. The database default is not. The application trusts its own storage as if the value had already been validated.

The stored default bypasses request validation. Request parameters are filtered. The database default is not. The application trusts its own storage as if the value had already been validated.

The limit is concatenated into SQL. LIMIT is treated as a string fragment. The database driver accepts stacked statements.

The limit is concatenated into SQL. LIMIT is treated as a string fragment. The database driver accepts stacked statements.

The poller executes a database-stored command string. poller_item.arg1 is passed to popen() without an allowlist. Anything that can write that row can run a shell command.

The poller executes a database-stored command string. poller_item.arg1 is passed to popen() without an allowlist. Anything that can write that row can run a shell command.

The fourth step is the one that turns a SQL injection into a shell. The third step is the one that makes Cacti’s database tell the truth. The first two are the ones that let an anonymous visitor get there.

I have seen SQL injection findings that are interesting but useless because the database user cannot write anything important, or because the application never uses the data in a dangerous place. This is not one of those. The database row the guest can write is the row the poller executes.

What an attacker does

The interesting part is not the id command. The interesting part is what lives on a Cacti server.

A Cacti host is usually a jump box by accident. It has:

SNMP community strings for network devices;

device credentials in the database;

SSH keys or service accounts used by pollers;

database credentials in include/config.php ;

mail relay credentials;

access to internal management networks;

cron jobs and backup scripts;

the trust of every device that accepts monitoring traffic.

Once I have a shell on that host, I do not need to exploit the network devices. I can read the credentials Cacti already uses and log in as the monitoring account. I can change the data the operations team sees. I can suppress alerts by editing the poller or the database. I can use the host as a pivot into segments that only the monitoring server can reach.

That is why this is bad. It is not just "a web app got a shell." It is "the thing that watches the network is now on the attacker's side."

The four-request path is also quiet. A guest session is normal. A profile update is normal. A preview request is normal. A realtime graph request is normal. There is no upload, no exploit payload in a URL that looks like a shell, and no authentication event. The loudest artifact is a PHP warning a non-numeric value, and most teams do not alert on that.

Four requests. No credentials. Root on the monitoring server.

— ek0ms savi0r Church of Malware

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

Unpatched Cacti 1.2.31 Zero-Day (4HTTP2ROOT/4HTTP2SHELL) Enables Remote Code Execution via Guest Access Researcher ek0ms savi0r disclosed an unpatched flaw in Cacti 1.2.31, a PHP-based network monitoring tool, that can be chained into remote code execution using four HTTP requests when the default-disabled guest account is enabled. The chain is a stored second-order SQL injection: guest-controlled preview_graphs_per_page input is later concatenated into a SQL LIMIT clause, and stacked statements modify poller settings to run shell commands. The researcher published a proof of concept on GitHub on 26 November 2026 (Thanksgiving Day, per BleepingComputer); Previdian tracks it as VULN-2026-0010 and confirmed the PoC in a lab. The researcher demonstrated root-level execution in a lab where Cacti ran as root, but watchTowr and others note that impact depends on the account running the web server and poller, often a low-privileged user. Articles report the flaw could expose SNMP strings and device credentials Cacti stores. No CVE, vendor patch, or CVSS score had been issued at the time of reporting, and the articles describe Cacti 1.2.31 as confirmed affected while other versions have not been ruled out. As of 27 November 2026, watchTowr reports no exploitation in the wild. Recommended mitigation is disabling the guest account and restricting the web interface to trusted networks; disabling guest access blocks the demonstrated path but does not fix the underlying SQL injection. 17 sources 69

Extracted Entities

Attack Types (1)

Platforms (1)

Vulnerabilities (1)