# 4HTTP2SHELL: Cacti Core <= 1.2.31 SQL Injection (GHSA-5x85-g4vc-gq53, no CVE assigned) Exploited in the Wild

> A stacked-query SQL injection in Cacti Core 1.2.31 and earlier lets any user holding the default Normal User permissions read and write the entire Cacti database, leading to administrator takeover and OS command execution. A public PoC (4HTTP2SHELL, originally 4HTTP2ROOT) chains it with the guest account for unauthenticated four-request RCE; exploitation attempts began November 27, one day after the PoC was published.

- **Author:** Threadlinqs Team
- **Published:** 2026-11-30T19:00:23Z
- **Last updated:** 2026-11-30T19:00:23Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7100
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7100.png
- **ID:** TL-2026-7100
- **Severity:** HIGH (CVSS 8.8)
- **Category:** VULNERABILITY
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 12

## Description

The flaw is an input-validation failure in Cacti Core (GHSA-5x85-g4vc-gq53, CWE-20 / CWE-89, no CVE assigned at time of writing). In auth_profile.php, action=update_data stores the posted value of user settings listed in $settings_user without validating it. The setting preview_graphs_per_page is later used as a default in graph_view.php and concatenated, without prepared statements, into a LIMIT clause in get_allowed_graphs() in lib/auth.php. Because lib/database.php does not disable emulated prepares or multi-statement execution, the injected value allows stacked queries. A logged-in user with realm 7 (View Graphs) and realm 20 (Update Profile), both part of the default Normal User set, gains read/write access to the whole Cacti database. The reporter states this leads to administrator takeover and, through intended administrative features, command execution on the server. The advisory is rated CVSS 3.1 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

The public PoC, published November 26, 2026 by the researcher 'ek0ms savi0r' (initially named 4HTTP2ROOT, later 4HTTP2SHELL), chains the injection with the guest account and real-time graph handling to reach unauthenticated command execution in four HTTP requests: a guest session, a profile update, a preview, and a real-time graph request. Per watchTowr's description, the unvalidated per-user display value is inserted into a query processed as multiple statements; one injected statement changes a poller setting to a shell command, which a separate guest-reachable page then causes the poller to execute. Previdian describes it as an unauthenticated second-order (stored) SQL injection that manipulates polling configuration. The guest account has been disabled by default since Cacti 0.8.7, so the unauthenticated path requires the guest account to be enabled. In the researcher's lab, commands ran as root because Cacti ran as root; in typical deployments they run with the web/poller process privileges. No file upload, shell-like URL, or authentication event is involved, and none of the four requests looks unusual on its own.

Exploitation: watchTowr reported capturing active exploitation on November 27 via its Attacker Eye platform. Previdian observed 22 time-based SQL injection probes from a single source IP against its Cacti honeypots on November 27 (and, per SecurityWeek, nearly 1,800 attempts overall); Previdian stated that successful remote command execution had not been confirmed. No attacker IPs, hashes, domains, or attribution have been published. Cacti monitoring servers commonly store SNMP community strings, device credentials, and database credentials and have trusted access to many network segments, so compromise is a likely pivot point.

Cacti was privately notified on 2026-11-19 by @amdadulbari. Patches were released for the 1.2.31 maintenance branch (PR #9013, commit 8910e2a), 1.2.x defense-in-depth (PR #9014, commit 49fd19b) and develop/1.3.0 (PR #9015, commit e23470d), and will ship in Cacti 1.2.32. The advisory was published 2026-11-29. Note that the separate CVE-2026-39893 (guest-reachable SQLi, fixed in 1.2.31) is a different issue and is not asserted to be the same flaw.

## MITRE ATT&CK

- T1595.002 Vulnerability Scanning
- T1190 Exploit Public-Facing Application
- T1078.001 Default Accounts
- T1059 Command and Scripting Interpreter
- T1098 Account Manipulation
- T1565.001 Stored Data Manipulation

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**Cacti Poller or Web Process Spawning Shell or Download Tool - Post-Exploitation** (`TL-2026-7100-SPL-002`)

Detects the post-exploitation step of 4HTTP2SHELL: a poller setting rewritten to a shell command is executed by the Cacti poller (cmd.php / poller.php / spine) or a web process, so php, spine or the web server spawns sh/bash/curl/wget/nc or a scripting interpreter. Uses the Splunk CIM Endpoint.Processes data model fed by Linux process telemetry.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1059.004, T1059, T1105
- **Data sources:** Endpoint.Processes datamodel, DeviceProcessEvents, linux process_creation
- **Severity:** high
- **Confidence:** medium

### Splunk SPL

```spl
| tstats summariesonly=false count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN ("php","php-fpm","php-cgi","php7.4","php8.1","php8.2","php8.3","spine","apache2","httpd") AND Processes.process_name IN ("sh","bash","dash","zsh","curl","wget","nc","ncat","python","python3","perl") by host Processes.parent_process Processes.parent_process_name Processes.process_name Processes.process Processes.user | rename "Processes.*" as * | convert ctime(firstTime) ctime(lastTime)
```

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName in~ ("php", "php-fpm", "php-cgi", "spine", "apache2", "httpd") or InitiatingProcessFileName startswith "php"
| where FileName in~ ("sh", "bash", "dash", "zsh", "curl", "wget", "nc", "ncat", "python", "python3", "perl")
| where InitiatingProcessCommandLine has_any ("poller.php", "cmd.php", "spine", "cacti") or InitiatingProcessFolderPath has "cacti" or InitiatingProcessFileName in~ ("apache2", "httpd", "php-fpm")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine
```

### Sigma

```yaml
title: Cacti Poller or Web Process Spawning Shell or Download Tool
id: 9e5b7c13-2a64-4f08-b3d9-0c8e4a6d1f52
status: experimental
description: Detects php, spine or a web server process spawning a shell, downloader or interpreter, consistent with the Cacti poller executing a command injected into a database-stored poller setting after 4HTTP2SHELL exploitation (GHSA-5x85-g4vc-gq53).
references:
  - https://github.com/Cacti/cacti/security/advisories/GHSA-5x85-g4vc-gq53
  - https://blog.previdian.com/cacti-zero-day-what-we-know-so-far/
author: Threadlinqs Team
date: 2026-11-30
tags:
  - attack.execution
  - attack.t1059
  - attack.t1059.004
  - attack.command-and-control
  - attack.t1105
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent_poller:
    ParentCommandLine|contains:
      - 'poller.php'
      - 'cmd.php'
      - 'spine'
  selection_parent_web:
    ParentImage|endswith:
      - '/apache2'
      - '/httpd'
      - '/php-fpm'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
  condition: (selection_parent_poller or selection_parent_web) and selection_child
falsepositives:
  - Cacti data-input scripts that legitimately run through a shell
  - Web applications on the same host that shell out for legitimate reasons
level: high
```

**Known false positives:**

- Cacti data-input methods or custom scripts that legitimately execute through sh/bash
- Other PHP applications on the same server invoking curl or wget

**Tuning notes:** Baseline legitimate poller child processes for 7-14 days and exclude known script paths. Scope to Cacti hosts with a host lookup. Prioritize hits where the child command line contains curl/wget/nc, /dev/tcp or base64, or where new files appear in the web root or /tmp.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Time-Based SQL Injection Probes Against Cacti Graph Endpoints - Exploitation (locked: unlock with TL Creds)
- Cacti Stacked-Query Write to Settings via preview_graphs_per_page - Post-Exploitation (locked: unlock with TL Creds)
- Cacti Poller/Web Child Process Making Outbound Public Connection - C2 (locked: unlock with TL Creds)
- Cacti Log Warning for Non-Numeric preview_graphs_per_page - Exploitation (locked: unlock with TL Creds)
- Cacti Stacked Query Creating or Modifying Admin Accounts - Post-Exploitation (locked: unlock with TL Creds)
- Reverse Shell Command Line Spawned by Cacti Poller or Web Process - C2 (locked: unlock with TL Creds)
- 4HTTP2SHELL Cacti Four-Request Chain ([indicator] + [indicator] + graph_realtime.php) - Exploitation (locked: unlock with TL Creds)
- Cacti Server Unexpected External Egress (Reverse Shell or Payload Fetch) - C2 (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- ['4HTTP2SHELL' Cacti Vulnerability Exploited in Attacks](https://www.securityweek.com/4http2shell-cacti-vulnerability-exploited-in-attacks/)
- [GHSA-5x85-g4vc-gq53: SQL injection in Cacti](https://github.com/Cacti/cacti/security/advisories/GHSA-5x85-g4vc-gq53)
- [watchTowr: 4HTTP2ROOT Cacti Zero-Day FAQ](https://watchtowr.com/intelligence/4http2root-cacti-zero-day-faq/)
- [Previdian: Cacti Zero-Day - What We Know So Far (VULN-2026-0010)](https://blog.previdian.com/cacti-zero-day-what-we-know-so-far/)
- [4HTTP2SHELL PoC write-up (Sad-Girls-0day-Club)](https://github.com/ekomsSavior/Sad-Girls-0day-Club/tree/main/4http2shell)
- [Cacti PR #9013 - 1.2.31 maintenance patch](https://github.com/Cacti/cacti/pull/9013)
- [Cacti PR #9014 - 1.2.x defense-in-depth patch](https://github.com/Cacti/cacti/pull/9014)
- [Cacti PR #9015 - develop (1.3.0) patch](https://github.com/Cacti/cacti/pull/9015)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7100
