This is the English adaptation of the original Korean analysis at dohyeontech.github.io.
On November 26, 2026, a researcher publishing as ek0ms savi0r put a write-up, an exploit script and a demonstration video into a GitHub repository under the title 4HTTP2ROOT, later renamed 4HTTP2SHELL. The claim: four HTTP requests, no account, no session, a shell on Cacti 1.2.31. "No login. No valid API key. No phishing. Just four HTTP requests against the default guest surface," the write-up opens.
Cacti is open-source network monitoring: it polls servers, routers, switches and firewalls and draws the results. What makes a compromised Cacti host different from a compromised web app is placement. Cacti has to hold SNMP community strings and device credentials in its own database to do its job, and firewall policy commonly lets that host reach devices across otherwise separated segments. Own the monitoring server and you are not done with the monitoring server.
This piece separates three things that are easy to blur: what is confirmed, what the code shows, and what nobody has published. What is confirmed is a public PoC, a vendor patch merged on November 28, and a GitHub advisory published November 29. What is absent is a CVE identifier, a KEV entry, and — as of the morning of November 30 — a fixed release. watchTowr says it observed exploitation; it has published no count, no targets and no attribution.
1. The recorded sequence
| Time (UTC) | Event |
|---|---|
| 2026-11-19 | Researcher Md. Amdadul Bari Imad privately reports the user-setting validation flaw (SQL injection) to Cacti |
| 2026-11-25 | ek0ms savi0r creates the GitHub repository Sad-Girls-0day-Club |
| 2026-11-26 01:34 / 17:19 | 4HTTP2ROOT write-up published / exploit script, transcript and video published (no prior notice to Cacti) |
| 2026-11-27 | Previdian honeypots log 22 time-based SQL injection attempts from one IP · watchTowr's Attacker Eye captures active exploitation |
| 2026-11-28 00:24 / 01:28 | PR #9013 (1.2.31 branch) and PR #9014 (1.2.x) merged; Cacti confirms the fix to BleepingComputer and The Hacker News |
| 2026-11-29 00:32 | GitHub advisory GHSA-5x85-g4vc-gq53 published (High, CVSS 8.8, no CVE) |
| 2026-11-29 | watchTowr FAQ updated: in-the-wild exploitation reported |
| 2026-11-30 | 1.2.32 unreleased · no CVE · not in CISA KEV |
Read the order of those rows. The core defect was privately reported on November 19. The public PoC arrived seven days later. The patch was merged the day after the PoC. Development speed was never the constraint here.
The constraint is distribution. Cacti's latest release on GitHub is still 1.2.31, published June 15, 2026. What an administrator can actually install today is a commit on a maintenance branch plus a .patch file.
CISA's catalog adds nothing to fall back on. The last KEV addition was November 27 (two GeoServer flaws, one Drupal core flaw), and there was no new entry on November 28 or 29. 4HTTP2SHELL has no CVE, which means it cannot appear in KEV at all. "Not in KEV" is not a safety signal in this case; it is a consequence of the missing identifier.
Confirmed versus open
| Item | Status |
|---|---|
| Public PoC | Confirmed — write-up, script and video in one repository |
| Affected versions | Confirmed, narrow — reproduced on Cacti Core 1.2.31; earlier releases unverified |
| Preconditions | Confirmed — guest account enabled (off by default since 0.8.7), realtime graphing usable, writable cache directory |
| Privilege obtained | Confirmed — the account running the Cacti web server and poller (root in the researcher's lab, usually www-data or apache) |
| Vendor patch | Confirmed — merged to three branches November 28; no release |
| Advisory | Confirmed — GHSA-5x85-g4vc-gq53, CVSS 8.8, CWE-20 and CWE-89 |
| CVE | None — not assigned as of November 30 |
| Exploitation | Partly confirmed — watchTowr reports observation; count, targets and actor unpublished. Previdian saw 22 probes, no confirmed command execution |
| Actual victim organizations | Unknown — no public incident named |
The strength of the exploitation claim deserves precision. watchTowr captured "Active Exploitation" through its sensor network on November 27 and updated its FAQ on November 29 to say the flaw is being exploited in the wild. Previdian's 22 events on the same day were time-based injection attempts against honeypots, with no confirmed shell. The two observations do not conflict: scanners and automated tooling started probing within a day of publication, and how many of those probes reached execution is unpublished.
2. Where the defect lives
This is not one bug. It is four unremarkable-looking decisions in series. The line references below are the ones in the advisory and the patch diff.
2.1 The profile write accepts any value
case 'update_data': $name = get_nfilter_request_var('name'); $value = get_nfilter_request_var('value'); ... api_auth_update_user_setting($name, $value); get_nfilter_request_var() is, by name, the accessor that applies no filter. The value reaches storage here:
db_execute_prepared('REPLACE INTO settings_user (name, value, user_id) VALUES (?, ?, ?)', array($name, $value, $user)); The write is a prepared statement. That is the trap: the storage layer is safe and the consumer is not. The only check is that $name is a key defined in $settings_user. Nothing asks whether the value is an integer for a setting that must be an integer.
The same file shows what the correct path looks like. save_user_settings() in lib/functions.php resets non-numeric values of numeric settings to their default. The one-line AJAX path skipped that step, and also skipped the is_view_allowed('graph_settings') check that form_save() performs. Two doors for the same job, one of them unlocked.
2.2 The stored value is promoted to a request variable
preview_graphs_per_page holds the graph-preview page size. In lib/html_graph.php it becomes the default for the graphs request variable:
'graphs' => array('filter' => FILTER_VALIDATE_INT, 'pageset' => true, 'default' => read_user_setting('preview_graphs_per_page', 20)) A filter is declared, so this looks handled. But validate_store_request_vars() in lib/html_utility.php calls set_request_var($variable, $options['default']) when the variable is absent from the request or when reset=1 clears the session copy. The default does not pass through the filter. Filters apply to values that arrive over HTTP; a value the application fetched from its own database is treated as already trusted internal state.
That is the broken invariant. The codebase assumes "request variables are validated." Feeding a user-controlled database setting into a request variable as a default quietly voids the assumption. Validation was available at three points — on arrival, on write, on read — and two were empty.
2.3 A string is pasted into SQL
graph_view.php builds the pagination fragment by concatenation:
$limit = (get_request_var('graphs')*(get_request_var('page')-1)) . ',' . get_request_var('graphs'); PHP arithmetic reads leading digits only. "10;DO SLEEP(4)" * 0 evaluates to 0 with a warning that Cacti's error handler logs and survives. So $limit becomes 0,10;DO SLEEP(4).
In get_allowed_graphs() (lib/auth.php) it is appended as text:
$sql_limit = "LIMIT $sql_limit"; ... $graphs = db_fetch_assoc("SELECT ... $sql_where $sql_order $sql_limit"); Not a prepared call. LIMIT takes two integers, which is probably why it was never treated as a binding site. (That is my reading of the code, not a documented rationale.)
2.4 The driver runs stacked statements
An injection here would normally be inert, because a second statement is not executed. Cacti's PDO connection in lib/database.php sets neither PDO::ATTR_EMULATE_PREPARES = false nor PDO::MYSQL_ATTR_MULTI_STATEMENTS = false, so emulated prepares and multi-statement execution stay at their defaults. The whole string LIMIT 0,10;UPDATE ... reaches the server and the appended UPDATE runs.
2.5 The poller executes a database string
A realtime graph starts at graph_realtime.php?action=init, which goes through poller_realtime.php into cmd_realtime.php:
$output = trim(exec_poll($item['arg1'])); // cmd_realtime.php $fp = popen($command, 'r'); // lib/poller.php poller_item.arg1 is a shell command by design — the poller exists to run scripts. Anyone who can write that row can run a command on that host. This is what lifts the finding from data tampering to remote code execution, and it is why the SQL injection alone is not the right thing to patch.
3. The four requests
| Step | Request | Boundary crossed |
|---|---|---|
| 1 | GET auth_profile.php?tab=general&header=false | A guest session and CSRF token without credentials |
| 2 | POST auth_profile.php?tab=general&action=update_data with name=preview_graphs_per_page | An integer setting accepts a SQL fragment |
| 3 | GET graph_view.php?action=preview | The stored value lands in LIMIT and a stacked UPDATE poller_item executes |
| 4 | GET graph_realtime.php?action=init&local_graph_id=... | The rewritten arg1 runs through popen() |
Step 1 is ordinary guest behavior. The researcher's framing is exact: the guest account is not the problem; what the guest account can write is.
Step 3 returns HTTP 200 with a normal preview page. One PHP warning about a non-numeric value goes to the log. Step 4 returns graph JSON. For the attacker there is no error signal; for the defender, three benign requests and three hostile ones produce nearly the same log lines.
The identifiers in the PoC (local_data_id=1, host_id=1) belong to the lab. A real target needs an existing graph and poller item, so the script does not run identically everywhere. That limit does not make it harmless: step 3 alone gives read and write access to the Cacti database as the application user, which means account rows, not just shells.
3.1 The same defect has a second door
The November 29 advisory matters because it says this is not guest-only. The default "Normal User" permission set includes realm 7 (View Graphs) and realm 20 (Update Profile). Any logged-in user with those obtains full administrator rights through the same path. The advisory scores that variant CVSS 8.8 (PR:L) and notes that administrator access leads to OS command execution through Cacti's intended features — data input methods, plugins, path settings. That variant works on deployments with guest access disabled.
One defect, two doors: a guest session gives unauthenticated RCE where guest access is on; any normal account gives privilege escalation where it is off. The second door is the more common one in practice, since help-desk and outsourced operations staff routinely hold that permission set.
4. Hunting
4.1 Non-numeric values in the settings table
SELECT user_id, name, value FROM settings_user WHERE name IN ('preview_graphs_per_page','treeview_graphs_per_page', 'realtime_interval','min_tree_width','max_tree_width','page_refresh') AND value NOT REGEXP '^[0-9]+$'; In a healthy deployment this returns nothing.
4.2 Poller command changes
poller_item.arg1 legitimately contains paths and arguments, so "has a value" is not a signal. Compare against a backup or version-controlled configuration. Prioritise rows containing hex strings (0x...), semicolons, pipes, redirection, or command names such as id, whoami or curl. Correlated changes to host_id or action on the same row strengthen the finding.
4.3 Request sequence in the web log
Within one session and a short window: a guest auth_profile.php?tab=general fetch, a POST to auth_profile.php?tab=general&action=update_data naming preview_graphs_per_page, a graph_view.php?action=preview call carrying page, clear or reset, then graph_realtime.php?action=init. Normal users do not save display preferences and initialise a realtime graph in the same few seconds.
4.4 Other trail
- "Non-numeric value" PHP warnings in the Cacti log — flagged by both the advisory and watchTowr.
- Newly created PHP files in the web root. The guest writes where the web server reads; the PoC retrieves its marker over HTTP.
- Unexpected files in
cache/realtime/. - New outbound connections from the Cacti host toward monitored devices — SNMP, SSH, Telnet — that do not match polling behaviour.
5. Patch analysis
5.1 The 1.2.31 maintenance patch (PR #9013, commit 8910e2a)
Seven files, +123/−13, in four movements.
Destructive actions become POST-only and guest-excluded: save, update_data, clear_user_settings, reset_default and logout_everywhere return 405 without POST, and 403 unless cacti_user_can_save_own_settings() passes. That helper only asks whether the session user is the guest account, with a comment noting that a guest session is shared across visitors.
Values are validated against the setting schema. cacti_user_setting_value_allowed() requires an empty string or on for checkboxes, a defined key for dropdowns, and is_numeric() where the setting's default is numeric.
Values are validated again on read. cacti_graph_pagination() re-casts page and rows through FILTER_VALIDATE_INT with a minimum of 1 and guards overflow with intdiv(PHP_INT_MAX, $rows), and graph_view.php only stores graphs when it is one of the predefined page sizes.
The UI moves from GET to POST with CSRF: profile resets and logout-everywhere no longer fire from a link. A unit test, tests/Unit/GraphProfileSecurityTest.php, is included.
Understand what this patch is: it blocks the write. The LIMIT concatenation in graph_view.php and lib/auth.php is untouched. The defence is that no bad value can be stored — reasonable, but a single layer. Add another write path, or find an exception in the validation helper, and the site reopens.
5.2 The defense-in-depth patch (PR #9014, commit 49fd19b)
Eight files, +643/−89. This one is broader: a new lib/user_setting_validation.php (256 lines) holding per-setting validation, csrf_require_post(), guest mutations rejected across profile and realtime endpoints. In graph_realtime.php it enforces is_graph_allowed() before poller execution and cache reads, anchors the graph_nolegend regex, validates sess_realtime_hash, and clamps realtime intervals before they reach a shell.
The awkward part is that this stronger patch sits on the 1.2.x branch, while Cacti points 1.2.31 administrators at the narrower #9013. Two levels of defence exist for one issue, and the delivery channel is empty.
5.3 What an administrator can do today
Waiting for 1.2.32 is not an option on November 30.
- Disable the guest account. Console → Configuration → Settings → Authentication, Guest User → "No User". This alone breaks the unauthenticated chain. If guest access exists so a NOC display or help desk can view graphs, give those users individual accounts.
- Restrict the web interface. Cacti has no business on the internet. Move it behind a VPN or allowlist.
- Apply a patch.
8910e2aon 1.2.31,49fd19bon 1.2.x. The vendor recommends lab testing first; the change is small enough to revert. - Hunt. Run the section 4 queries; inspect the web root and poller configuration.
- Rotate on suspicion. SNMP community strings and device credentials held by Cacti, the Cacti database account, and the firewall rules that let this host reach other segments.
- Reduce normal-user exposure. Even with guest access off, realm 20 remains in the default "Normal User" set. Until patched, keep that population small.
6. The third time in the same file
Read as a single event, the lesson is "turn off guest access." Cacti's release notes say something less comfortable. The June 2026 1.2.31 release carried roughly thirty security fixes, many of the same family:
- CVE-2026-39955 — unauthenticated SQL injection via an unanchored
FILTER_VALIDATE_REGEXPingraph_view.php - CVE-2026-39948 — SQL injection via the
rfilterparameter in RLIKE clauses - CVE-2026-39947 — RRDtool IPC pipe poisoning via an
is_numericnewline bypass - CVE-2026-39938 — unauthenticated LFI via
graph_theme, plus rrdtool IPC serialization hardening - CVE-2026-39949 — authenticated RCE via host variable injection
Two SQL injections in graph_view.php filter handling. Two issues on the RRDtool command path. This one is the pagination path in graph_view.php — the third.
The pattern, as I read it: fixes have addressed the reported call site each time, while the disciplines that would prevent the class — validate user settings before storage, bind numeric values instead of concatenating them, restrict strings that reach a shell to an allowlist — were never established across the codebase. Every new path that is not on a filter list reproduces the same accident. The new is_graph_allowed() check and realtime interval clamp in the 1.2.x patch look like an attempt to establish that discipline. Whether it reaches administrators depends on release policy, and right now that policy is the gap.
Look once more at the intervals. Private report November 19, public PoC November 26, patch November 28, advisory November 29, release pending. Development took nine days; public pressure cut two of them. What remains is packaging and shipping. watchTowr's sensors logged exploitation in that window, and a server with guest access enabled cannot tell from the outside which side of that log it is on. Checking the guest setting and poller_item.arg1 does not have to wait for the release.
The original Korean analysis, with the full timeline and the same source-level walkthrough, is at dohyeontech.github.io.