Back to Intelligence

Unpatched Cacti Zero-Day With Public PoC Enables Unauthenticated RCE — Detection and Mitigation Guide

SA
Security Arsenal Team
November 27, 2026
11 min read

A publicly disclosed zero-day in the Cacti network monitoring platform — released together with working proof-of-concept exploit code — allows unauthenticated attackers to execute arbitrary commands on vulnerable servers. There is no vendor patch available at the time of writing, and exploit code is already circulating. That combination should set off alarms in every SOC that has Cacti anywhere in its environment.

Cacti is a widely deployed open-source graphing and network monitoring solution built on RRDTool, commonly found in NOCs, ISPs, hosting providers, and enterprise infrastructure teams. It is also, historically, one of the most consistently abused platforms in the exploitation landscape — prior Cacti flaws have been weaponized within days of disclosure and used to deploy botnets, cryptominers, and web shells. Monitoring servers are high-value targets: they typically hold credentials for network devices, sit in privileged network segments with broad reachability, and are rarely hardened to the same standard as production assets. An unauthenticated RCE on this class of system is not a theoretical risk — it is a pivot point into your infrastructure.

If you run Cacti, assume exploitation attempts are either already happening against internet-facing instances or will be within hours. Your immediate priorities are exposure reduction, detection coverage, and threat hunting for compromise that may have already occurred.

Technical Analysis

Affected Component

The vulnerability affects the Cacti web application — a PHP-based front end typically deployed on Linux (Apache/Nginx with PHP-FPM) backed by a MySQL/MariaDB database. Cacti instances expose a web UI on standard HTTP/HTTPS ports, and the vulnerable code path is reachable without authentication, meaning any attacker with network access to the web interface can trigger command execution in the context of the web server user (commonly www-data, apache, or nginx).

Because no vendor fix has shipped, all currently supported Cacti release lines should be treated as potentially vulnerable until the vendor publishes an advisory and patched version. Cacti's track record of pre-authentication and command-injection flaws — frequently rooted in unsanitized input flowing into shell commands used by its poller and graph rendering functions — is directly relevant context here.

Attack Chain (Defender's View)

From a detection engineering perspective, the observable attack chain is:

  1. Reconnaissance — Attackers scan for Cacti's characteristic web fingerprint: paths such as /cacti/, /graph_view.php, /graph.php, and the login page title banner.
  2. Exploit delivery — A crafted HTTP request (GET or POST) hits the vulnerable PHP endpoint carrying a command-injection payload. Typical payloads in the public PoC ecosystem for this class of bug include shell metacharacters (;, |, $(), backticks), references to /bin/sh or /bin/bash, and second-stage retrieval via curl or wget.
  3. Execution — The web server or PHP-FPM worker process spawns a shell or interpreter as a child process. This is the single highest-fidelity detection opportunity.
  4. Post-exploitation — Web shell upload into the web root, cron-based persistence, credential harvesting from Cacti's database (include/config.php contains DB credentials; the DB itself stores SNMP communities and device credentials), and lateral movement toward managed network devices.

Exploitation Status

  • Patch availability: None. This is a true zero-day at time of disclosure.
  • Proof of concept: Public and functional. Public PoC availability historically correlates with mass scanning and exploitation within 24–72 hours for Cacti specifically.
  • CISA KEV: Monitor the KEV catalog; prior Cacti RCEs have been added rapidly once exploitation was confirmed.
  • Severity assessment: Treat as critical for any internet-exposed instance and high for internal instances reachable by user or partner networks.

Detection & Response

This is a technical threat, so full detection content follows. The detections are built around the two most reliable observables: (1) command-injection patterns in web requests against Cacti paths, and (2) web server processes spawning shells or tooling.

YAML
---
title: Web Server Process Spawning Shell on Cacti Host
id: 8c4f2a17-3b6e-4d91-a5c8-9f1e2d7b4a63
status: experimental
description: Detects a shell or command interpreter spawned by a web server or PHP process, consistent with exploitation of the unauthenticated Cacti command execution zero-day via public PoC.
references:
  - https://www.bleepingcomputer.com/news/security/unpatched-cacti-zero-day-with-public-poc-gives-remote-code-execution/
  - https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/06/15
tags:
  - attack.initial_access
  - attack.t1190
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'
      - '/php-fpm8.3'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/nc'
      - '/ncat'
      - '/netcat'
      - '/python'
      - '/python3'
      - '/perl'
      - '/curl'
      - '/wget'
  condition: selection_parent and selection_child
falsepositives:
  - Cacti poller legitimately invokes scripts via the web context in rare configurations; baseline per-host and alert on net-new child processes
level: high
---
title: Command Injection Patterns in HTTP Requests to Cacti Endpoints
id: 2e7b9d41-6a3c-4f58-b2e1-7c8d5a4f9b06
status: experimental
description: Detects HTTP requests containing shell metacharacters or interpreter references targeting Cacti application paths, consistent with public PoC exploitation attempts against the unauthenticated Cacti RCE.
references:
  - https://www.bleepingcomputer.com/news/security/unpatched-cacti-zero-day-with-public-poc-gives-remote-code-execution/
  - https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/06/15
tags:
  - attack.initial_access
  - attack.t1190
logsource:
  category: webserver
detection:
  selection_path:
    cs-uri|contains:
      - '/cacti/'
      - 'graph_view.php'
      - 'graph.php'
      - 'remote_agent.php'
      - 'poller.php'
  selection_injection:
    cs-uri|contains:
      - '%3B'
      - '%7C'
      - '%24%28'
      - '%60'
      - ';id'
      - '|id'
      - '/bin/sh'
      - '/bin/bash'
      - 'wget%20'
      - 'curl%20'
      - '${IFS}'
  condition: selection_path and selection_injection
falsepositives:
  - Vulnerability scanners and authenticated security testing; tune for authorized scan sources
level: high
---
title: Web Shell Dropped in Cacti Web Root
id: 5f1a8c39-2d47-4e6b-93a5-1b9c4e7d2f80
status: experimental
description: Detects creation or modification of PHP files in Cacti web directories, a common post-exploitation artifact following RCE against the Cacti platform.
references:
  - https://www.bleepingcomputer.com/news/security/unpatched-cacti-zero-day-with-public-poc-gives-remote-code-execution/
  - https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/06/15
tags:
  - attack.persistence
  - attack.t1505.003
logsource:
  category: file_event
  product: linux
detection:
  selection_path:
    TargetFilename|contains:
      - '/cacti/'
      - '/var/www/html/'
      - '/usr/share/cacti/'
  selection_ext:
    TargetFilename|endswith:
      - '.php'
      - '.phtml'
      - '.phar'
  filter_package:
    User|contains:
      - 'apt'
      - 'dpkg'
  condition: selection_path and selection_ext and not filter_package
falsepositives:
  - Legitimate Cacti upgrades or plugin installations; correlate with maintenance windows
level: high
KQL — Microsoft Sentinel / Defender
// Hunt for Cacti exploitation: command injection in web requests and shell spawns on Linux hosts
// Assumes Apache/Nginx access logs ingested via CommonSecurityLog or Syslog, plus process data via Defender for Endpoint (Linux) or Sysmon-equivalent telemetry

// Part 1: Inbound requests to Cacti paths carrying injection payloads (firewall/reverse proxy/WAF logs)
CommonSecurityLog
| where TimeGenerated > ago(7d)
| where RequestURL has_any ("/cacti/", "graph_view.php", "graph.php", "remote_agent.php", "poller.php")
| where RequestURL has_any ("%3B", "%7C", "%24%28", "%60", ";id", "|id", "/bin/sh", "/bin/bash", "wget", "curl", "${IFS}")
| summarize AttemptCount = count(), DistinctTargets = dcount(DestinationHostName) by SourceIP, RequestURL, DestinationHostName, bin(TimeGenerated, 1h)
| order by AttemptCount desc;

// Part 2: Shell or LOLBin execution under web server / PHP-FPM parents on Cacti hosts (Linux MDE)
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName has_any ("apache2", "httpd", "nginx", "php-fpm", "php-fpm7.4", "php-fpm8.1", "php-fpm8.2", "php-fpm8.3")
| where FileName has_any ("sh", "bash", "dash", "nc", "ncat", "curl", "wget", "python", "python3", "perl")
| project TimeGenerated, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, AccountName, RemoteIP
| order by TimeGenerated desc;

// Part 3: Outbound connections from Cacti web server processes (post-exploitation C2 / payload retrieval)
DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where InitiatingProcessFileName has_any ("apache2", "httpd", "nginx", "php-fpm", "sh", "bash", "curl", "wget")
| where RemotePort in (80, 443, 4444, 8080, 8443) or RemoteIPType == "Public"
| summarize ConnCount = count(), Ports = make_set(RemotePort), IPs = make_set(RemoteIP) by DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, bin(TimeGenerated, 1h)
| order by ConnCount desc
VQL — Velociraptor
-- Cacti RCE hunt: web-context shell execution, dropped PHP files, and persistence on Linux hosts
-- Deploy across all Linux endpoints running Cacti / LAMP stacks

-- Part 1: Shells and download tools running as the web server user
SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE (Username =~ 'www-data|apache|nginx'
       AND Name =~ '^(sh|bash|dash|nc|ncat|curl|wget|python3?|perl)$')
   OR CommandLine =~ '/bin/(ba)?sh|curl http|wget http'

-- Part 2: Recently created/modified PHP files in Cacti web roots (web shells)
SELECT FullPath, Size, Mtime, Atime, Ctime
FROM glob(globs=['/var/www/html/cacti/**/*.php', '/usr/share/cacti/**/*.php'])
WHERE Mtime > now() - 604800
ORDER BY Mtime DESC

-- Part 3: Listening sockets and outbound connections from web/php processes
SELECT Pid, Name, Family, Status, Laddr, Lport, Raddr, Rport
FROM netstat()
WHERE Name =~ 'apache2|httpd|nginx|php-fpm|sh|bash'
  AND (Status =~ 'ESTAB|LISTEN')
Bash / Shell
#!/bin/bash
# Cacti Zero-Day Exposure Reduction & Compromise Check
# Run on Cacti hosts. Review output before taking destructive actions.

echo "=== Cacti Version ==="
grep -r "cacti_version" /var/www/html/cacti/include/ 2>/dev/null || \
  php -r 'include "/var/www/html/cacti/include/global.php"; print $config["cacti_version"]."\n";' 2>/dev/null

echo "=== [1] Restrict access to Cacti web UI at the firewall (allowlist admin/mgmt subnets only) ==="
# Example: permit only the management network 10.0.10.0/24 to reach the Cacti UI
sudo iptables -C INPUT -p tcp --dport 443 -s 10.0.10.0/24 -j ACCEPT 2>/dev/null || \
  sudo iptables -I INPUT -p tcp --dport 443 -s 10.0.10.0/24 -j ACCEPT
sudo iptables -C INPUT -p tcp --dport 443 -j DROP 2>/dev/null || \
  sudo iptables -A INPUT -p tcp --dport 443 -j DROP
sudo iptables -C INPUT -p tcp --dport 80 -s 10.0.10.0/24 -j ACCEPT 2>/dev/null || \
  sudo iptables -I INPUT -p tcp --dport 80 -s 10.0.10.0/24 -j ACCEPT
sudo iptables -C INPUT -p tcp --dport 80 -j DROP 2>/dev/null || \
  sudo iptables -A INPUT -p tcp --dport 80 -j DROP

echo "=== [2] Apache-level allowlist (alternative/defense-in-depth) ==="
# Add to the Cacti vhost or /etc/apache2/conf-available/cacti-restrict.conf, then: a2enconf cacti-restrict && systemctl reload apache2
# <Directory /usr/share/cacti>
#   Require ip 10.0.10.0/24
# </Directory>

echo "=== [3] Hunt: shells/download tools spawned by web server user ==="
ps -eo user,ppid,pid,comm,args | grep -E "www-data|apache|nginx" | \
  grep -E "bash|sh |dash|nc |ncat|curl|wget|python|perl" | grep -v grep

echo "=== [4] Hunt: recently modified PHP files in web root (possible web shells) ==="
find /var/www/html /usr/share/cacti -type f \( -name "*.php" -o -name "*.phtml" -o -name "*.phar" \) -mtime -14 -ls 2>/dev/null

echo "=== [5] Hunt: suspicious cron persistence for web user ==="
crontab -l -u www-data 2>/dev/null; crontab -l -u apache 2>/dev/null
ls -la /var/spool/cron/ /etc/cron.d/ 2>/dev/null

echo "=== [6] Hunt: outbound connections from web server processes ==="
ss -tnp | grep -E "apache2|httpd|nginx|php-fpm"

echo "=== [7] Review access logs for injection payloads against Cacti paths ==="
grep -iE "cacti|graph_view|graph\.php|poller\.php" /var/log/apache2/access.log* /var/log/nginx/access.log* 2>/dev/null | \
  grep -E "%3B|%7C|%24%28|%60|/bin/sh|/bin/bash|wget|curl|id%3B|id%7C" | tail -100

echo "=== Done. Escalate any hits to IR immediately and preserve logs/memory before remediation. ==="

Remediation

Because no vendor patch exists yet, remediation is about exposure elimination, compensating controls, and compromise assessment — in that order.

Immediate (0–24 hours):

  1. Take Cacti off the internet. There is no legitimate reason for a network monitoring console to be internet-reachable. Place it behind a VPN or jump host, or firewall it to allowlisted management subnets only. Use the Bash script above as a starting point.
  2. Inventory every instance. Search your attack surface management data, certificate transparency logs, and Shodan/Censys exports for cacti fingerprints across all business units, subsidiaries, and lab environments. Forgotten instances in dev VLANs are exactly what gets popped.
  3. Deploy the detections above and run the VQL hunt across all candidate hosts. Any web-context shell execution on a Cacti server in the last 30 days warrants a full IR investigation, not a ticket.
  4. Hunt historically. Public PoC means scanning may predate your detection deployment. Pull 30+ days of access logs and review for injection payloads against Cacti endpoints.

Short term (24–72 hours):

  1. Monitor the vendor. Watch the official Cacti security page (https://www.cacti.net) and GitHub security advisories for a patched release. Subscribe to the Cacti GitHub repository release notifications. Apply the patch within 24 hours of release — Cacti exploits operationalize fast.
  2. Add WAF/reverse-proxy rules blocking requests containing shell metacharacters (;, |, $(, backtick, ${IFS}) in URI parameters bound for Cacti paths, if the instance must remain reachable during the patch window.
  3. Reduce blast radius. Ensure the web server runs as a low-privilege user, sudo rights for the web account are revoked, egress from the Cacti host is restricted to required destinations only, and the host cannot freely reach internal network device management interfaces.

Compromise assessment (if any detection fires):

  1. Preserve volatile data (memory, running processes, network connections) before rebuilding. Check for web shells, rogue cron entries, new local users, and unauthorized SSH keys.
  2. Rotate everything Cacti touches: the database credentials in include/config.php, all SNMP communities and credentials stored in the Cacti database for managed devices, and any service accounts used by Cacti scripts. Assume they were read.
  3. Review authentication logs on network devices managed by the compromised Cacti instance for use of harvested credentials.

Cacti has been here before, and the exploitation window after public PoC release is measured in days, not weeks. Treat every reachable instance as compromised until you can prove otherwise.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

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