Tag: 4HTTP2SHELL

Detecting Cacti 4HTTP2SHELL: 4 Sigma rules for web logs, the poller and the web root

Detecting Cacti 4HTTP2SHELL: 4 Sigma rules for web logs, the poller and the web root

An unpatched bug with a public proof of concept and no CVE is the worst kind of week for a detection team: no vendor signature, no scanner plugin, nothing in the threat feeds. That is where Cacti users are with 4HTTP2SHELL, the four-request chain that turns an enabled guest account on Cacti 1.2.31 into command execution. Cacti merged matching fixes into its source branches on November 28, but no release carries them yet. I covered the bug, who is exposed and what to switch off in my analysis of the zero-day.

This post is the detection side. I found no published IOCs or request samples in the sources I read, so these four rules are built from the behaviour that watchTowr and RavenAI describe, plus my own reasoning where I say so. They are all experimental. Treat them as starting points to tune, not as alerts to page someone on at 3 a.m.

At a glance

  • Rules: 4 (one Sigma v2 correlation with three base rules, two host rules, one hunting rule).
  • Domains: Web/App and Linux.
  • Log sources: web server access logs with query strings, the PHP or web server error log and the Cacti log, Linux process creation and file creation (Sysmon for Linux, auditd or EDR).
  • ATT&CK: T1190, T1059.004, T1105, T1505.003.
  • Status: experimental. No CVE tag, because there is no CVE.
  • GitHub: Detection Rules/Linux and Detection Rules/Web-App.

The case in brief

The chain needs Cacti’s guest account to be enabled, which is not the default. According to RavenAI’s breakdown, the guest saves a text value into preview_graphs_per_page through auth_profile.php, a display setting that should be a number. A graph_view.php preview request then concatenates that stored value into a SQL LIMIT clause, and a stacked statement rewrites the arg1 command of a poller_item row. Finally a guest-reachable realtime graph request runs the poller path, which executes the command as the Cacti web and poller account. watchTowr adds that a warning about a non-numeric value may be logged along the way (RavenAI calls it a PHP warning), and lists new files created by the poller process as a pivot. The full story is in the analysis.

So the traces land in four places: the web access log (the request order), the PHP error log or Cacti log (the warning), the database (the rewritten poller command) and the host (whatever that command starts, and any files it writes). Sigma covers three of them. The database is the gap.

Detection map

Block diagram: web access logs, the PHP or Cacti log and Linux host process and file events feed four Sigma rules (request-order correlation, non-numeric warning hunt, suspicious poller child, PHP written in the Cacti tree) mapped to ATT&CK T1190, T1059.004 with T1105, and T1505.003, with the poller_item database rewrite marked as a gap.
Three log sources, four rules. The SQL rewrite of the poller command stays a database check.

Read it left to right. Web logs feed the correlation rule, which watches for the request order. The PHP error log or Cacti log feeds a keyword hunt. Host telemetry feeds the two rules I trust most: a suspicious child process under PHP, the web server or the spine poller, and a PHP file written into the Cacti tree by one of those processes. On the right, the red dashed box is the part none of the rules can see: the SQL write into poller_item. You close that with a scheduled database query, not a SIEM rule.

Rule overview

RuleDomainLog sourceATT&CK (tactic / technique)LevelStatus
Suspicious command spawned by Cacti web server or pollerLinuxlinux / process_creationExecution / T1059.004, C2 / T1105HighExperimental
Profile update, then preview, then realtime graph (correlation)Web/AppwebserverInitial Access / T1190MediumExperimental
PHP file written in Cacti web root by a web processLinuxlinux / file_eventPersistence / T1505.003MediumExperimental
Non-numeric value warning in the PHP or Cacti log (hunting)Web/Appcacti / application (PHP or Cacti log)Initial Access / T1190LowExperimental

The rules

Suspicious command spawned by Cacti web server or poller

Context: the last step of the chain is the poller running a command an anonymous guest chose. Whatever the attacker does next (download a tool, open a reverse shell, check who they are) starts as a process under PHP, Apache or spine. This is the rule I would turn on first, because it does not depend on how the command got into the poller.

Condition: alert when PHP, Apache/httpd or spine starts a shell whose command line contains curl, wget, a /dev/tcp redirect, base64, whoami, netcat, socat, chmod +x or an inline Python one-liner, or starts one of those tools directly. The lineage is my inference: I assume Cacti hands the stored command to a shell, so I match both the shell and the direct case.

ATT&CK: Execution (TA0002) – T1059.004 Unix Shell; Command and Control (TA0011) – T1105 Ingress Tool Transfer.

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

View on GitHub

False positives and tuning: custom data input scripts that poll HTTP APIs with curl are the obvious one. Add a filter on their script path rather than dropping curl from the list. Scope the rule to hosts tagged as Cacti servers, because on a general PHP web server it will be noisier.

How to test: on a lab Cacti host, run a harmless command through PHP as the web user, for example sudo -u www-data php -r 'system("whoami");'. That produces PHP starting a shell that runs whoami, the same lineage the rule looks for.

Profile update, then preview, then realtime graph from one client

Context: RavenAI describes the chain’s footprint as a guest profile update followed by graph preview and realtime graph initialisation requests. Each request on its own is normal Cacti use. The order, from one client in a short window, is what stands out.

Condition: three informational base rules match auth_profile.php with action=update_data, graph_view.php with action=preview, and graph_realtime.php. A Sigma v2 temporal_ordered correlation fires when the same client IP hits all three in that order within 10 minutes. The action=update_data string comes from InfoSec Monkey’s hunting grep; action=preview is the standard Cacti preview URL and my assumption. Access logs do not show request bodies, so the rule cannot see the injected value itself.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application.

title: Cacti Profile Update Request
id: 79a15d1d-b432-48fb-8b57-83e92d9f520c
name: cacti_profile_update_request
status: experimental
description: |
    Base rule for the 4HTTP2SHELL sequence correlation. Matches a request to the Cacti user profile update action,
    the step where the chain stores a value in a per-user display setting.
references:
    - https://ravenai.sh/blog/four-requests-to-shell-cacti
    - https://infosecmonkey.com/cacti-4http2shell-zero-day/
    - https://netsec101.com/?p=584
author: netsec101.com
date: 2026-11-28
tags:
    - attack.initial-access
    - attack.t1190
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection:
        cs-uri-stem|endswith: '/auth_profile.php'
        cs-uri-query|contains: 'action=update_data'
    condition: selection
falsepositives:
    - Users changing their own profile settings (expected; this base rule is not meant to alert on its own)
level: informational
---
title: Cacti Graph Preview Request
id: d3eb6803-9216-45a4-98d5-c877fc4f3a35
name: cacti_graph_preview_request
status: experimental
description: |
    Base rule for the 4HTTP2SHELL sequence correlation. Matches the graph_view.php preview action, which reads the
    stored page-size preference back into a SQL query.
references:
    - https://ravenai.sh/blog/four-requests-to-shell-cacti
    - https://netsec101.com/?p=584
author: netsec101.com
date: 2026-11-28
tags:
    - attack.initial-access
    - attack.t1190
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection:
        cs-uri-stem|endswith: '/graph_view.php'
        cs-uri-query|contains: 'action=preview'
    condition: selection
falsepositives:
    - Normal graph browsing in preview mode (expected; this base rule is not meant to alert on its own)
level: informational
---
title: Cacti Realtime Graph Request
id: 7d465808-b5cb-44ec-be1f-89fbedd54bb0
name: cacti_realtime_graph_request
status: experimental
description: |
    Base rule for the 4HTTP2SHELL sequence correlation. Matches a request to graph_realtime.php, the page that
    triggers the realtime poller path where the rewritten command runs.
references:
    - https://ravenai.sh/blog/four-requests-to-shell-cacti
    - https://netsec101.com/?p=584
author: netsec101.com
date: 2026-11-28
tags:
    - attack.initial-access
    - attack.t1190
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection:
        cs-uri-stem|endswith: '/graph_realtime.php'
    condition: selection
falsepositives:
    - Users opening realtime graphs (expected; this base rule is not meant to alert on its own)
level: informational
---
title: Cacti Profile Update Followed by Graph Preview and Realtime Graph - Possible 4HTTP2SHELL Chain
id: efe4f9f7-cadc-41a8-b8f0-d7fd9ad6127f
status: experimental
description: |
    Detects one client sending a Cacti profile update, then a graph_view.php preview, then a graph_realtime.php
    request within ten minutes, the request order RavenAI describes for the 4HTTP2SHELL guest-to-shell chain.
    Inferred from published analyses; I found no published request samples in the sources I read.
references:
    - https://ravenai.sh/blog/four-requests-to-shell-cacti
    - https://watchtowr.com/intelligence/4http2root-cacti-zero-day-faq/
    - https://netsec101.com/?p=584
author: netsec101.com
date: 2026-11-28
tags:
    - attack.initial-access
    - attack.t1190
    - detection.emerging-threats
correlation:
    type: temporal_ordered
    rules:
        - cacti_profile_update_request
        - cacti_graph_preview_request
        - cacti_realtime_graph_request
    group-by:
        - c-ip
    timespan: 10m
falsepositives:
    - A logged-in user who changes the preview page size and then opens a realtime graph; check whether the client is a known admin or NOC address
level: medium

View on GitHub

False positives and tuning: a logged-in admin who changes the preview page size and then opens a realtime graph will trigger it. Exclude your NOC and admin subnets, or better, enrich with the session user if your web server logs it and alert only when it is the guest. If guest is off on all your servers, this rule should be silent; any hit is worth a look.

How to test: on a lab install, log in, change the graphs-per-page preference, open preview mode, then open a realtime graph, all within a few minutes.

PHP file written in the Cacti web root by a web process

Context: watchTowr lists new files created by the poller process as a detection pivot, and RavenAI mentions an unexpected web shell or marker file. Once an attacker can run commands as the web user, dropping a PHP file in the Cacti tree is the cheapest way to keep access after you turn guest off.

Condition: alert when a file ending in .php is created under a path containing /cacti/, and the writing process is PHP, Apache/httpd, spine or a shell. Legitimate Cacti code arrives through the package manager or an admin’s deployment, not through those processes.

ATT&CK: Persistence (TA0003) – T1505.003 Web Shell.

title: PHP File Written in Cacti Web Root by Web Server or Shell Process
id: 23d1ea44-9240-49d3-9768-00be868c537d
status: experimental
description: |
    Detects a .php file created under a Cacti installation path by PHP, the web server, the spine poller or a shell.
    watchTowr lists new files created by the poller process, and RavenAI an unexpected web shell or marker file, as pivots
    after 4HTTP2SHELL exploitation. Legitimate Cacti code is written by the package manager or an admin, not by these processes.
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.persistence
    - attack.t1505.003
    - detection.emerging-threats
logsource:
    product: linux
    category: file_event
detection:
    selection_path:
        TargetFilename|contains: '/cacti/'
        TargetFilename|endswith: '.php'
    selection_writer:
        - Image|contains: '/php'
        - Image|endswith:
              - '/apache2'
              - '/httpd'
              - '/spine'
              - '/sh'
              - '/bash'
              - '/dash'
    condition: all of selection_*
falsepositives:
    - Cacti plugin installs or upgrades done through the web UI (match the time against change records)
    - Installs where Cacti lives outside a path containing /cacti/ will not match; adjust the path
level: medium

View on GitHub

False positives and tuning: plugin installs through the web UI write PHP as the web user, so match hits against change records. If Cacti lives in a path without /cacti/ in it, change the path. A shell writing the file is in the list on purpose: an attacker’s echo into a file comes from sh, not PHP.

How to test: as the web user, have PHP write a harmless file into the Cacti directory, check for the alert, then delete the file.

Non-numeric value warning in the PHP or Cacti log

Context: watchTowr and BleepingComputer both say a warning about a non-numeric value in a graph display setting may be logged when the chain runs, while the request itself succeeds. RavenAI describes it as a PHP warning. Depending on your setup it lands in the PHP or web server error log, or in Cacti’s own log, so forward both.

Condition: match the keyword non-numeric in the forwarded PHP error log or Cacti log. I could not find the exact message text in the sources, so I kept it to the keyword. That makes it a hunting rule, not an alert.

ATT&CK: Initial Access (TA0001) – T1190 Exploit Public-Facing Application.

title: Non-Numeric Value Warning on a Cacti Host - 4HTTP2SHELL Hunting
id: af338bec-2440-4abd-8619-e984ec9031de
status: experimental
description: |
    Hunts for warnings about non-numeric values on a Cacti host. watchTowr notes a warning about a non-numeric value in a
    graph display setting may be logged when the 4HTTP2SHELL chain runs, while the request still succeeds; RavenAI calls it
    a PHP warning. Where it lands (PHP or web server error log, or the Cacti log) depends on the setup. The exact text is
    not published, so this matches the keyword only and needs review.
references:
    - https://watchtowr.com/intelligence/4http2root-cacti-zero-day-faq/
    - https://www.bleepingcomputer.com/news/security/unpatched-cacti-zero-day-with-public-poc-gives-remote-code-execution/
    - https://netsec101.com/?p=584
author: netsec101.com
date: 2026-11-28
tags:
    - attack.initial-access
    - attack.t1190
    - detection.threat-hunting
logsource:
    product: cacti
    service: application
    definition: 'Requirement: forward the PHP or web server error log and the Cacti log from the Cacti host to the SIEM (locations vary by install).'
detection:
    keywords:
        - 'non-numeric'
    condition: keywords
falsepositives:
    - PHP warnings from unrelated code paths or plugins with sloppy numeric handling
level: low

View on GitHub

False positives and tuning: any plugin with sloppy number handling can produce the same PHP warning. Once you see a real hit, copy the exact message into the rule and raise its level.

How to test: append a line containing “non-numeric” to the forwarded log in a lab and confirm it reaches the SIEM and matches.

Coverage and gaps

Step in caseTacticTechniqueRuleCovered?
Guest profile write, preview, realtime requestsInitial Access (TA0001)T1190Correlation rule, PHP or Cacti log huntYes (inferred URIs)
Stacked SQL rewrites poller_item.arg1Initial Access (TA0001)T1190NoneGap: database only
Poller runs the attacker commandExecution (TA0002)T1059.004Suspicious poller childYes, with process telemetry
Tool downloadCommand and Control (TA0011)T1105Suspicious poller childPartial
Web shell or file dropPersistence (TA0003)T1505.003PHP written in Cacti treeYes, with file telemetry
Follow-on actions (reading credentials, pivoting to devices)Variousn/aNoneGap: not described by sources

The biggest blind spot is the SQL write. Most teams do not audit the Cacti database, and a rewritten poller_item row looks like any other config change. I would close it with a scheduled read-only query: alert when a preview_graphs_per_page value in settings_user is not a plain number, and diff poller_item.arg1 against yesterday’s copy. The analysis post has the queries. The second gap is everything after the first command. Cacti servers hold SNMP credentials (the poller_item table itself has SNMP community and password columns) and can usually reach most network devices, so if the host rule fires, assume the attacker read the config and check your devices’ logs for logins from the Cacti server.

Deploying the rules

Grab the YAML from GitHub and convert it with sigma-cli for your SIEM. The Linux rules need a pipeline that maps Sysmon for Linux or your EDR’s field names; the web rules need your access log fields mapped to cs-uri-stem, cs-uri-query and c-ip. Correlation rules need a backend that supports Sigma v2 correlations (check yours); otherwise build the sequence as a saved search by hand. For example:

sigma list pipelines
sigma convert -t splunk --without-pipeline proc_creation_lnx_cacti_web_poller_suspicious_child.yml
sigma convert -t lucene --without-pipeline file_event_lnx_cacti_webroot_php_written_by_web_process.yml
sigma convert -t splunk --without-pipeline web_cacti_guest_profile_preview_realtime_sequence_correlation.yml

The --without-pipeline output keeps the Sigma field names, so rename them to your own schema, or swap in a pipeline from sigma list pipelines that matches your log source; pipeline names change between sigma-cli plugin versions. Run everything in alert-only mode for a week before it pages anyone, and tune the process rule’s filters with what your own data input scripts actually run.

My take

Honestly, the best detection for this bug is not a rule. It is setting Guest User to No User and taking the web UI off the internet, which closes the chain completely. Everything in this post is for the case where you cannot do that today, or where guest was on before you read about this and you need to know if someone got in.

Of the four, the process rule is the one worth keeping forever. Cacti has had four guest-reachable or unauthenticated paths published this year, and most of the impact flows through a poller that runs commands from a database table. Watching what that poller starts catches this chain and the next one. What I would really like is for Cacti to log changes to poller_item and to guest profile settings by default, with the user and source IP. That single log line would turn the biggest gap in this post into the easiest alert.

Sources

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