Back to Intelligence

4HTTP2SHELL: Unpatched Cacti Zero-Day Enables Unauthenticated RCE in Four HTTP Requests — Detection and Hardening Guide

SA
Security Arsenal Team
November 27, 2026
12 min read

An unpatched remote code execution vulnerability in Cacti — the widely deployed open-source network monitoring and graphing platform — has been publicly detailed with a working proof-of-concept. The flaw, tracked by researchers as 4HTTP2SHELL and 4HTTP2ROOT, allows a completely unauthenticated attacker to go from a fresh HTTP session to command execution on the Cacti server in just four HTTP requests, abusing the platform's guest access functionality. No CVE identifier has been assigned yet, and at the time of writing no vendor patch is available.

This is a defender's nightmare scenario for three reasons. First, Cacti servers sit at the heart of network visibility — they hold SNMP community strings, device credentials, network topology maps, and often have privileged reach into routers, switches, and servers. Second, Cacti instances are frequently exposed to broad internal user populations, and a surprising number are reachable from the internet. Third, the exploitation bar here is effectively zero: no credentials, no session hijacking, no race conditions — four requests and the attacker has a shell.

If you run Cacti anywhere in your environment, treat this as an active incident-prep exercise today: inventory exposure, disable guest access, restrict network reachability, and deploy the detections below.

Technical Analysis

Affected Product

  • Product: Cacti (open-source network monitoring/graphing tool, LAMP/LEMP stack)
  • Component: Web application authentication and guest access handling
  • Platforms: Linux servers running Apache or Nginx with PHP and MySQL/MariaDB (typical deployments: /var/www/html/cacti/, service account www-data or apache)
  • CVE: None assigned at time of publication
  • Prerequisites for exploitation: Unauthenticated network access to the Cacti web interface with guest access enabled

How the Attack Works (Defender's View)

The researcher describes a path "from a fresh, unauthenticated HTTP session to command execution as the Cacti server" user. While full technical specifics are still emerging, the observable attack chain has the following characteristics that matter for detection engineering:

  1. Four-request pattern from a single source: Exploitation completes in four HTTP requests. A SOC reviewing web logs should look for a tight burst of requests to Cacti endpoints from an IP with no prior session history, no valid authenticated session cookie, and a user agent that doesn't match your browser baseline (PoCs are typically driven by python-requests, curl, or custom scripts).
  2. Guest access is the entry point: The flaw rides the guest access feature. Any Cacti instance where a guest user is configured (the guest_user setting in Cacti's configuration) is in the blast radius. Unauthenticated requests that proceed past the login page without credential submission are the pre-condition.
  3. Command execution as the web service account: Post-exploitation, the attacker lands code execution as the account running the web stack — typically www-data (Debian/Ubuntu) or apache (RHEL/CentOS). The single highest-fidelity detection signal is therefore the web server or PHP-FPM process spawning a shell or command interpreter (sh, bash, dash, python, perl, nc, curl, wget). Legitimate Cacti poller activity runs via cron as the cacti system user — interactive shells parented to apache2/httpd/nginx/php-fpm are almost never benign.
  4. Webshell staging: A common second stage after achieving PHP-level code execution is dropping a .php file into the web root for persistence. Watch for file writes under the Cacti directory tree by the web service account.

Exploitation Status

  • PoC availability: Public proof-of-concept exists and has been described in detail by the researcher.
  • CVE / vendor patch: No CVE assigned; no official patched release at time of writing. This is a true zero-day window.
  • CISA KEV: Not yet listed (no CVE exists to list). Monitor KEV closely — Cacti flaws have historically been added rapidly once weaponized at scale, and internet-scanning for this target class begins within hours of PoC publication.

Given a public PoC with a four-request exploit path, assume mass scanning and opportunistic exploitation are imminent or already underway. Cacti instances indexed on Shodan/Censys are effectively target lists.

Detection & Response

The detections below are built around the strongest behavioral signals of this exploit chain: web-stack processes spawning interpreters, file drops in the Cacti tree, and the compressed four-request web pattern. Deploy them on every host running Cacti and against your web access logs.

YAML
---
title: Web Server Process Spawning Shell on Cacti Host
id: 4a1c8e52-3b7d-4f29-9c61-8d2e5f7a01b3
status: experimental
description: Detects the Cacti web stack (Apache, Nginx, PHP-FPM) spawning a command interpreter or common post-exploitation tool, consistent with the 4HTTP2SHELL/4HTTP2ROOT unauthenticated RCE chain landing code execution as the web service account.
references:
  - https://thehackernews.com/2026/11/unpatched-cacti-zero-day-enables-rce-in.html
  - https://attack.mitre.org/techniques/T1059/
  - https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/11/15
tags:
  - attack.initial_access
  - attack.execution
  - attack.t1190
  - attack.t1059.004
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/apache2'
      - '/httpd'
      - '/nginx'
      - '/php-fpm'
      - '/php-fpm7.4'
      - '/php-fpm8.1'
      - '/php-fpm8.2'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/python'
      - '/python3'
      - '/perl'
      - '/nc'
      - '/ncat'
      - '/netcat'
      - '/curl'
      - '/wget'
      - '/whoami'
      - '/id'
  condition: selection_parent and selection_child
falsepositives:
  - Rare legitimate admin tooling invoked through custom Cacti plugins or scripts; verify against change records
level: critical
---
title: PHP File Created or Modified in Cacti Web Directory
id: 7e2f9b14-5c8a-4d31-8f47-2b6c1a9e03d5
status: experimental
description: Detects creation or modification of PHP files under Cacti web directories outside of package upgrades, consistent with webshell staging following exploitation of the Cacti unauthenticated RCE.
references:
  - https://thehackernews.com/2026/11/unpatched-cacti-zero-day-enables-rce-in.html
  - https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/11/15
tags:
  - attack.persistence
  - attack.t1505.003
logsource:
  category: file_event
  product: linux
detection:
  selection_path:
    TargetFilename|contains:
      - '/cacti/'
      - '/var/www/html/'
  selection_ext:
    TargetFilename|endswith:
      - '.php'
      - '.phtml'
      - '.phar'
  condition: selection_path and selection_ext
falsepositives:
  - Cacti version upgrades and plugin installations; correlate with package manager activity and maintenance windows
level: high
---
title: Reverse Shell Pattern in Web Service Process Command Line
id: 9c3d6e81-2f4b-4a58-b720-6e1d8c5f09a2
status: experimental
description: Detects reverse shell command-line patterns executed under the web service context, a likely follow-on to the Cacti 4HTTP2SHELL code execution path.
references:
  - https://thehackernews.com/2026/11/unpatched-cacti-zero-day-enables-rce-in.html
  - https://attack.mitre.org/techniques/T1059/004/
author: Security Arsenal
date: 2026/11/15
tags:
  - attack.execution
  - attack.command_and_control
  - attack.t1059.004
  - attack.t1572
logsource:
  category: process_creation
  product: linux
detection:
  selection_user:
    User|contains:
      - 'www-data'
      - 'apache'
      - 'nginx'
  selection_cmd:
    CommandLine|contains:
      - '/dev/tcp/'
      - 'bash -i'
      - 'sh -i'
      - 'nc -e'
      - 'ncat -e'
      - 'mkfifo'
      - 'socket.socket'
      - 'pty.spawn'
  condition: selection_user and selection_cmd
falsepositives:
  - None expected under web service accounts in normal operations
level: critical

The KQL queries below assume Cacti host telemetry is reaching Microsoft Sentinel via Syslog (auditd/execve or process auditing) and Apache/Nginx access logs via CommonSecurityLog or a custom log table. The first query hunts the post-exploitation process signal; the second reconstructs the four-request exploitation burst pattern at the web layer.

KQL — Microsoft Sentinel / Defender
// Hunt 1: Web service account spawning shells or post-exploitation tooling on Cacti hosts (Syslog process auditing)
let WebUsers = dynamic(["www-data", "apache", "nginx"]);
let SuspiciousProc = dynamic(["sh", "bash", "dash", "python", "python3", "perl", "nc", "ncat", "curl", "wget", "whoami"]);
Syslog
| where TimeGenerated > ago(14d)
| where SyslogMessage has_any (WebUsers)
| where SyslogMessage has_any (SuspiciousProc)
| extend User = extract(@"user=([a-zA-Z0-9_-]+)", 1, SyslogMessage),
         Proc = extract(@"(sh|bash|dash|python3?|perl|nc|ncat|curl|wget|whoami)", 1, SyslogMessage)
| where User in (WebUsers) and isnotempty(Proc)
| project TimeGenerated, Computer, User, Proc, SyslogMessage
| order by TimeGenerated desc;

// Hunt 2: Four-request burst pattern against Cacti from unauthenticated sources (access logs via CommonSecurityLog)
CommonSecurityLog
| where TimeGenerated > ago(14d)
| where RequestURL has "cacti" or DestinationHostName has "cacti"
| summarize RequestCount = count(),
            FirstSeen = min(TimeGenerated),
            LastSeen = max(TimeGenerated),
            URLs = make_set(RequestURL, 20),
            UserAgents = make_set(RequestClientApplication, 10)
    by SourceIP, bin(TimeGenerated, 5m)
| where RequestCount between (4 .. 12)
| extend BurstSeconds = datetime_diff("second", LastSeen, FirstSeen)
| where BurstSeconds < 120
| where UserAgents has_any ("python-requests", "curl", "Go-http-client", "wget") or array_length(UserAgents) == 0
| project SourceIP, RequestCount, BurstSeconds, URLs, UserAgents
| order by RequestCount asc;

// Hunt 3: New PHP files written to web directories (Defender for Endpoint on Linux)
DeviceFileEvents
| where TimeGenerated > ago(14d)
| where FolderPath has_any ("/var/www/html/cacti", "/usr/share/cacti", "/srv/www")
| where FileName endswith ".php" or FileName endswith ".phtml"
| where ActionType in ("FileCreated", "FileModified")
| project TimeGenerated, DeviceName, FolderPath, FileName, InitiatingProcessAccountName, InitiatingProcessCommandLine
| order by TimeGenerated desc;

For endpoint forensics on suspected Cacti servers, this Velociraptor artifact hunts live for the process-tree anomaly (web stack parented shells), recent PHP file drops in Cacti paths, and unexpected outbound connections from the web service account.

VQL — Velociraptor
-- Cacti 4HTTP2SHELL hunt: web stack spawning interpreters + recent PHP drops + suspicious outbound connections
LET proc_hits = SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE (Username =~ 'www-data|apache|nginx'
   AND (Name =~ '^(sh|bash|dash|python3?|perl|nc|ncat)$'
        OR CommandLine =~ '/dev/tcp/|bash -i|nc -e|mkfifo|pty.spawn'))
   OR (Exe =~ '(apache2|httpd|nginx|php-fpm)' AND Name =~ '^(sh|bash|dash)$')

LET file_hits = SELECT FullPath, Mtime, Ctime, Size
FROM glob(globs=['/var/www/html/cacti/**/*.php', '/usr/share/cacti/**/*.php'])
WHERE Mtime > (now() - 1209600)
ORDER BY Mtime DESC

LET net_hits = SELECT Pid, Name, Status, LocalAddress, LocalPort, RemoteAddress, RemotePort
FROM netstat()
WHERE Status =~ 'ESTABLISHED'
  AND Name =~ '(www-data|apache2|httpd|nginx|php-fpm|sh|bash)'
  AND NOT RemotePort in (80, 443, 3306)

SELECT 'process' AS Category, format(format='%v', args=proc_hits) AS Result FROM scope()
UNION ALL
SELECT 'recent_php_file' AS Category, format(format='%v', args=file_hits) AS Result FROM scope()
UNION ALL
SELECT 'outbound_connection' AS Category, format(format='%v', args=net_hits) AS Result FROM scope()

Remediation & Hardening

There is no vendor patch yet, so mitigation is configuration and architecture. Prioritize in this order:

  1. Disable guest access immediately. In the Cacti console: Configuration → Settings → Authentication — set the Guest User to "No User" (or remove the guest user mapping). You can also clear it directly in the database (settings table, guest_user key). This removes the unauthenticated entry point the exploit chain depends on.
  2. Remove network exposure. If the Cacti UI is reachable from the internet, take it off today — no exceptions. Place it behind a VPN or an authenticating reverse proxy (SSO with MFA). Restrict source IPs to your NOC/SOC management subnets via host firewall and upstream ACLs.
  3. Verify integrity before trusting the box. Because exploitation is trivially scriptable, check for signs of prior compromise before simply hardening: recent PHP file writes, www-data-owned shells in process history, unexpected cron entries for the web user, and new local accounts.
  4. Harden the service account. Ensure the web service account has no sudo rights, a nologin shell, and cannot write outside the Cacti directories it needs. Run the poller as a dedicated unprivileged user (Cacti's documented model) — never as root or the web user.
  5. Deploy the detections above to your SIEM/EDR and set the two critical Sigma rules to page.
  6. Monitor for the patch. Watch the official Cacti GitHub repository security advisories and cacti.net announcements. When a fixed release drops, apply it within 24–72 hours given the public PoC. Subscribe to CISA KEV feeds in case a CVE is assigned and listed.

The following Bash script audits a Cacti host for exposure and common compromise indicators, and applies the guest-access kill switch at the database layer. Review before running; adjust paths and DB credentials for your deployment.

Bash / Shell
#!/bin/bash
# Cacti 4HTTP2SHELL/4HTTP2ROOT exposure audit + guest access disable
# Run as root on the Cacti server. Adjust CACTI_DIR and DB creds as needed.

CACTI_DIR="/var/www/html/cacti"
DB_NAME="cacti"
DB_USER="cactiuser"

echo "=== [1] Cacti version ==="
grep -h "cacti_version" "$CACTI_DIR/include/config.php" 2>/dev/null
php -r 'include "'"$CACTI_DIR"'/include/global.php"; print $config["cacti_version"]."\n";' 2>/dev/null || echo "Check version manually in Console -> About"

echo "=== [2] Current guest access setting ==="
mysql -u "$DB_USER" -p "$DB_NAME" -e "SELECT name, value FROM settings WHERE name='guest_user';"

echo "=== [3] DISABLING guest access (removing unauthenticated entry point) ==="
mysql -u "$DB_USER" -p "$DB_NAME" -e "UPDATE settings SET value='' WHERE name='guest_user';"
mysql -u "$DB_USER" -p "$DB_NAME" -e "SELECT name, value FROM settings WHERE name='guest_user';"
echo "Verify in UI: Configuration -> Settings -> Authentication -> Guest User = No User"

echo "=== [4] IoC check: PHP files modified in last 14 days under web root ==="
find /var/www/html /usr/share/cacti -name '*.php' -mtime -14 -printf '%T+ %u %p\n' 2>/dev/null | sort -r | head -50

echo "=== [5] IoC check: shells/interpreters spawned by web service account (current) ==="
ps -eo user,pid,ppid,comm,args | awk 'NR==1 || ($1 ~ /www-data|apache|nginx/ && $4 ~ /^(sh|bash|dash|python|python3|perl|nc|ncat)$/)'

echo "=== [6] IoC check: web user cron and persistence ==="
crontab -l -u www-data 2>/dev/null; crontab -l -u apache 2>/dev/null
ls -la /var/spool/cron/ 2>/dev/null
grep -E "www-data|apache|nginx" /etc/crontab /etc/cron.d/* 2>/dev/null

echo "=== [7] IoC check: outbound connections from web processes ==="
ss -tnp 2>/dev/null | grep -E "apache2|httpd|nginx|php-fpm" | grep ESTAB

echo "=== [8] IoC check: suspicious access-log bursts (4-request pattern) ==="
for LOG in /var/log/apache2/access.log /var/log/httpd/access_log /var/log/nginx/access.log; do
  [ -f "$LOG" ] && awk '{print $1}' "$LOG" | sort | uniq -c | sort -rn | head -20 && \
  grep -Ei "python-requests|curl/|Go-http-client" "$LOG" | grep -i cacti | tail -20
done

echo "=== [9] Network exposure check: who can reach the UI ==="
ss -tlnp 2>/dev/null | grep -E ':(80|443|8080)\b'
iptables -L INPUT -n 2>/dev/null | grep -E 'dpt:(80|443)' | head

echo "=== DONE. If sections 4-8 returned hits, treat the host as potentially compromised and initiate IR. ==="

Strategic Takeaways

  • Monitoring infrastructure is a crown jewel. Cacti, Zabbix, LibreNMS, and their peers hold credentials and topology that make them ideal pivot points. They deserve the same hardening standard as your directory services — isolated management networks, MFA front-ends, and aggressive EDR coverage.
  • Guest access is attack surface. Any feature that grants functionality without authentication should be off by default and audited quarterly. This is the second time in recent years a Cacti pre-auth path has been weaponized; treat unauthenticated code paths on internal tools as internet-grade risk.
  • Zero-day windows are won with behavior, not signatures. You cannot IOC your way out of a four-request exploit with no patch. The web-stack-spawning-shell detection in this post is durable, low-noise, and will catch the next unauthenticated RCE in any PHP application on these hosts — invest in that class of telemetry.
  • Assume scanning has started. Public PoC plus trivial exploitation equals internet-wide enumeration within hours. If you find an exposed instance, hunt it for compromise before you patch it.

Related Resources

Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.