Tag: Unpatched

Cacti 4HTTP2SHELL: an unpatched guest-account RCE in the current release

Cacti 4HTTP2SHELL: an unpatched guest-account RCE in the current release

Cacti 1.2.31 shipped on June 15, 2026, and four days later the project published advisories for three critical bugs it fixed, each scored CVSS 9.8 and none needing a password (one of them only on installs with guest viewing turned on). On November 26, 2026, a researcher published a chain that turns that same release into a command shell for an anonymous visitor, in four HTTP requests.

The chain is called 4HTTP2SHELL (first published as 4HTTP2ROOT). It has no CVE and no fixed release. On November 28 the Cacti project merged security fixes that match the chain into its source branches, but it has not shipped a release or an advisory. A working proof of concept is public on GitHub. There is one big condition: the Cacti guest account has to be enabled. If yours is, you have a problem tonight. If it is not, you should still read on: this is the fourth guest-reachable or unauthenticated path into Cacti published this year, and the guest role was already the precondition for one of the June bugs.

Severity: high. Unauthenticated code execution on a server that usually sits in the middle of the network and talks to most of your devices, held back from critical only because guest access is off by default and the code runs as the Cacti service account.

At a glance

  • Name: 4HTTP2SHELL, also 4HTTP2ROOT. No CVE assigned, no CVSS score (watchTowr, November 26, 2026).
  • Affected: Cacti Core 1.2.31, the current release, as tested by the researcher. Whether 1.2.30 and older are affected is not established.
  • Precondition: the guest account is enabled. No credentials or session needed.
  • Impact: OS command execution as the account that runs the Cacti web server and poller. The researcher’s lab returned root; watchTowr notes that in many installs this is a low-privileged web user.
  • Exploitation: public PoC since November 26. No in-the-wild exploitation reported as of November 29. Not in CISA KEV.
  • Patch: no fixed release yet. Matching fixes were merged into the 1.2.31 and 1.2.x source branches on November 28. Mitigation is to disable guest access and keep the web UI off untrusted networks.
  • Who should care: network and NOC teams running Cacti, especially anyone who turned on guest viewing for wall dashboards or customer graph pages.

What we know

The researcher, who goes by ek0ms savi0r and publishes with a group called Church of Malware, posted the write-up and PoC to a GitHub repository on November 26, 2026, US Thanksgiving. BleepingComputer reports the researcher said the flaw was not reported to Cacti before release. I have not seen a statement from the Cacti project, and its GitHub advisory list shows nothing from November when I checked on November 28.

watchTowr published an FAQ the same evening. It lists the CVE as not assigned, the vendor patch as pending and no fixed version. As of November 27 it reported no exploitation in the wild. RavenAI published a technical breakdown of the researcher’s chain the same day, and BleepingComputer, BreachNews and others picked it up on November 27.

On November 28 the Cacti project merged two security pull requests that line up with the chain step by step. Pull request 9013, for the 1.2.31 maintenance branch, stops shared guest sessions from saving profile or graph preferences and normalizes pagination values before they reach graph queries; its description says the patch also applies to the original 1.2.31 release tag. Pull request 9014, for the 1.2.x branch, rejects guest writes with HTTP 403, clamps the LIMIT values in graph_view.php and checks graph permission in graph_realtime.php before it calls shell_exec(). Neither names 4HTTP2SHELL, so the match is my reading, not a vendor statement. As of November 29 there is still no new release, no advisory and no CVE, and nobody has reported exploitation in the wild.

What is confirmed: the chain works on a lab instance of 1.2.31 with guest enabled, as published by the researcher and described consistently by watchTowr and RavenAI. What is not confirmed: the range of affected versions, how many exposed servers have guest turned on, and when a fix will land. Do not confuse it with CVE-2026-39893, one of the June bugs that 1.2.31 already fixed.

Timeline: June 15, 2026 Cacti 1.2.31 released; June 19 advisories published for three critical bugs fixed in 1.2.31, none needing a password and one only with guest viewing on; November 26 4HTTP2SHELL chain and PoC published against 1.2.31, researcher says Cacti was not told first; November 28 Cacti merges matching security fixes into its source branches, with no release, CVE or advisory yet.
1.2.31 closed three critical bugs that needed no password, one of them only with guest viewing on. The new chain breaks that same release.

How the chain works

Nothing here is exotic. It is a second-order SQL injection: the attacker stores a malicious value in one place and a different page later trusts it. Here is the flow at the level the published analyses describe it, without the request details.

First, the guest writes a profile setting. Cacti lets users, including the guest user, save display preferences through auth_profile.php. One of them, preview_graphs_per_page, should be a number. According to RavenAI, the update accepts any string.

Second, the graph preview reads it back. graph_view.php in preview mode loads the stored preference without the integer check it applies to request input, and concatenates it into the LIMIT clause of a SQL query. On the tested database path the query interface accepted an extra statement, so the stored value runs as its own SQL command. watchTowr notes that a warning about a non-numeric value may be logged at this point, and RavenAI describes it as a PHP warning. Depending on your setup it lands in the web server or PHP error log, or in Cacti’s own log. The request still succeeds either way.

Third, the injected statement rewrites a poller command. Cacti keeps the commands its poller runs in the database. RavenAI names the arg1 field of a poller_item row as the target. Change that value and you have changed what Cacti will execute next.

Fourth, a guest-reachable realtime graph page triggers the poller path (graph_realtime.php through to lib/poller.php), which runs the rewritten command on the host. That is four requests from an anonymous browser to a shell.

Four-step attack chain: guest writes a text value into a numeric profile setting, graph preview concatenates it into a SQL LIMIT clause, the stacked query rewrites a poller command, a realtime graph request runs it as the Cacti service user.
The 4HTTP2SHELL chain as described by watchTowr and RavenAI. Every step is reachable by an anonymous guest.

The design choice that makes this hurt is not new: Cacti stores the command lines its poller executes in a database table, so any SQL write primitive is one step from command execution. A numeric field nobody bound as a parameter, plus a database path that accepts stacked statements, is simply the latest way to reach that table.

Who is affected and how badly

The guest precondition matters a lot. Cacti’s documentation says the guest user has not been enabled by default since 0.8.7. To turn on anonymous access an admin has to enable the guest user and select it as the Guest User under Authentication settings. So a stock install is not exposed. The trouble is that people turn guest on for good reasons: a NOC wall screen, a public status page, customers who want to see their own bandwidth graphs.

Then think about where Cacti lives. It polls routers, switches and firewalls over SNMP, so the box holds community strings or SNMPv3 credentials and a full inventory of the network, and it usually has a route to most management interfaces. Code running as the Cacti user can read that configuration and the database, plant files in the web root, and use the server as a pivot. Whether that user is root depends on how you installed it. The researcher’s lab returned root, which tells you something about how lab installs get built, not about the bug.

My rating: critical for any internet-facing Cacti with guest enabled, because the PoC is public and there is no fixed release yet. High for internal installs with guest enabled, because anyone on the network, including malware already on a workstation, can use it. Low for installs with guest off, assuming nothing else in the chain turns out to be reachable after login. No source has published exposure counts, so I will not guess one.

What to do now

  1. Turn off guest access. In the console go to Configuration, Settings, Authentication and set Guest User to No User, then disable the guest account under Users. This removes the precondition entirely. If a wall screen needs graphs, give it a named read-only account.
  2. Take the web UI off the internet. Cacti has no business being reachable from outside a management network. Restrict it at the firewall or in the web server config to the admin and NOC subnets.
  3. Check whether you were exposed. If guest was on and the UI was reachable at any point since November 26, review the poller data and the web root (queries below) before you assume you are clean. Turning guest off now does not undo a rewritten poller command or a dropped web shell.
  4. Stay on 1.2.31 for now. It fixes the three critical June bugs. Do not roll back hoping the new chain does not reach older versions; nobody has shown that, and the older releases are definitely vulnerable to the June issues. The fixes merged on November 28 are not in any release yet. When Cacti ships a release or advisory that includes them, patch, and keep guest off anyway.
  5. Check what the Cacti service account is. If the web server or poller runs as root, fix that on your next maintenance window; it is the difference between a compromised app and a compromised host.

For the exposure check, three read-only queries against the Cacti database (adjust the database name). The first shows whether a guest user is mapped, the second finds stored page-size preferences that are not plain numbers, the third lists poller commands containing shell metacharacters. Legitimate script data inputs can contain pipes or semicolons, so read the results rather than treating every row as a hit. The table and column names match the Cacti 1.2.x schema file; the regular expression escaping is mine, so check it against your schema and your MySQL or MariaDB version before relying on it.

SELECT name, value FROM settings WHERE name = 'guest_user';
SELECT user_id, value FROM settings_user
  WHERE name = 'preview_graphs_per_page' AND value NOT REGEXP '^[0-9]+$';
SELECT local_data_id, arg1 FROM poller_item
  WHERE arg1 REGEXP '[;|`]|\\$\\(';

Detection and monitoring

I found no published IOCs or request samples in the sources I read, so everything here is behaviour-based and marked experimental. The good news is that the chain has to touch three places you can log: the web server sees the request sequence, a PHP warning about a non-numeric value may show up in the web server or PHP error log or in Cacti’s log, and the host sees whatever the rewritten poller command starts. The step in the middle, the SQL write into poller_item, is invisible to most SIEMs, which is why the database queries above matter. Process and file telemetry on Linux are off unless you run Sysmon for Linux, auditd or an EDR on the Cacti box.

RuleCategoryLog sourceATT&CKLevel
Suspicious command spawned by Cacti web server or pollerLinuxprocess_creationT1059.004, T1105High
Profile update, then preview, then realtime graph from one clientWeb/App (correlation)webserverT1190Medium
PHP file written in the Cacti web root by a web processLinuxfile_eventT1505.003Medium
Non-numeric value warning in the PHP or Cacti logWeb/App (hunting)PHP error log or Cacti logT1190Low

The one I would turn on first is the process rule. A monitoring server’s PHP or poller process has no reason to start a shell that runs curl, wget, netcat, base64 or a /dev/tcp redirect, or to launch those tools directly. It does not care how the command got into the poller, so it also catches the next variant. The process lineage is my inference from how Cacti runs poller commands, not something the sources spell out. If your own data input scripts call curl to poll an HTTP API, add a filter for their path.

title: Suspicious Command Spawned by Cacti Web Server or Poller - Possible 4HTTP2SHELL Exploitation
id: 60c2cf77-4095-4bbf-9a3d-fd67b80c2a27
status: experimental
description: |
    Detects a shell running download, reverse-shell, discovery or encoding commands, or such a tool started directly,
    under the PHP, web server or spine poller processes on a Linux Cacti host. The 4HTTP2SHELL chain rewrites a
    poller command that a realtime graph request then executes as the Cacti service account (inferred process lineage).
references:
    - https://watchtowr.com/intelligence/4http2root-cacti-zero-day-faq/
    - https://ravenai.sh/blog/four-requests-to-shell-cacti
    - https://netsec101.com/?p=584
author: netsec101.com
date: 2026-11-28
tags:
    - attack.execution
    - attack.t1059.004
    - attack.command-and-control
    - attack.t1105
    - detection.emerging-threats
logsource:
    product: linux
    category: process_creation
detection:
    selection_parent:
        - ParentImage|contains: '/php'
        - ParentImage|endswith:
              - '/apache2'
              - '/httpd'
              - '/spine'
    selection_shell:
        Image|endswith:
            - '/sh'
            - '/bash'
            - '/dash'
    selection_shell_payload:
        CommandLine|contains:
            - 'curl '
            - 'wget '
            - '/dev/tcp/'
            - 'base64'
            - 'whoami'
            - 'nc -'
            - 'ncat '
            - 'socat '
            - 'chmod +x'
            - 'python -c'
            - 'python3 -c'
    selection_direct_tool:
        Image|endswith:
            - '/curl'
            - '/wget'
            - '/nc'
            - '/ncat'
            - '/netcat'
            - '/socat'
            - '/whoami'
            - '/base64'
    condition: selection_parent and ((selection_shell and selection_shell_payload) or selection_direct_tool)
falsepositives:
    - Custom Cacti data input scripts that call curl or wget to poll HTTP APIs (scope by the script path and add a filter)
    - Other PHP applications on the same host; scope the rule to Cacti servers
level: high

Until Cacti ships a release with the fix, keep these running and re-run the database checks weekly. If guest was ever enabled on a reachable server, retro-hunt your web and host logs back to November 26, 2026, when the PoC went public. Once a patched release lands, keep the process rule permanently: it is cheap, and Cacti has had four guest-reachable or unauthenticated paths published this year.

I wrote up all four rules, with tuning notes, lab tests and ATT&CK coverage, in a separate detection post. The YAML lives in my Detection Rules repo, in the Linux and Web-App folders.

My take

The headline name oversells it. “Root in four requests” needs a non-default setting, and root only if you installed Cacti badly. I would not put this in the same bucket as an exploited VPN bug. But I think the story is underrated in a different way. In June, Cacti fixed three critical bugs that needed no login, two of them SQL injections in graph_view.php and one of them reachable only with guest viewing on. Five months later the release that fixed them falls to another guest-reachable SQL injection in the same file, which ends in a database table full of commands the poller will happily run. Patching each hole as it appears is not working. Cacti needs to treat the guest role as hostile input everywhere and treat poller_item as security-critical configuration, with integrity checks, not as just another table.

On the disclosure, I am not a fan. Dropping a full chain with a PoC on a holiday, with no notice to the project, mostly hurts the network teams who run it. That said, the researcher’s frustration with vendor triage is clearly real, and Cacti’s advisory history this year shows its maintainers already had plenty to fix. The practical answer does not depend on who is right: guest off, UI off the internet, and a look at your poller table tonight. Those three things close this chain completely, which is more than most zero-days give you.

Sources