Cacti
Cacti: SQL Injection in managers.php
Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior have SQL Injection through unsanitized unserialize+implode in managers.php. At line 756 of managers.php, the application assigns $selected_items by calling cacti_unserialize(stripslashes(gnrv('selected_graphs_array'))). The cacti_unserialize() function calls unserialize() with allowed_classes set to false, which prevents object injection but still allows arbitrary string arrays to be deserialized. Then, at lines 760 to 766, the deserialized array values are passed directly into db_execute('DELETE FROM snmpagent_managers WHERE id IN (' . implode(',', $selected_items) . ')'), where they are imploded into the SQL statement without any integer validation, resulting in SQL Injection when using SNMP agent management permissions. This issue has been fixed in version 1.2.31.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.2.31
Fixed in 1.2.31
Mitigation
Upgrade cacti to 1.2.31 or later.
References
- Vendor advisory github.com/Cacti/cacti/security/advisories/GHS…
- Release notes github.com/Cacti/cacti/releases/tag/release%2F…
Timeline
Days relative to CVE publicationFirst public PoC 1.8 days after publication; not in CISA KEV. First PoC: hakaioffsec/CVE-2026-40083 (created 27 Jun 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| hakaioffsec/CVE-2026-40083 | 27 Jun 2026 +1.8 d | 4 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /managers.php
- Key headers
Cookie: {var}- Body markers
__csrf_magic=action=savetab=generalid=0save_component_manager=1description=pochostname=127.0.0.1disabled=max_log_size=1snmp_version=1snmp_community=publicsnmp_port=162snmp_message_type=1notes=action=actionsselected_items=drp_action=1action_receivers=1drp_action=2selected_graphs_array=selected_items=a:1:selected_graphs_array=a:2:inapplication/x-www-form-urlencoded- Ports
- 8080, 8088
- Seen in
- 1 repo: hakaioffsec/CVE-2026-40083
- Evidence
- hakaioffsec/CVE-2026-40083/exploit/poc.py:101 hakaioffsec/CVE-2026-40083/exploit/poc.py:124 hakaioffsec/CVE-2026-40083/exploit/poc.py:135 hakaioffsec/CVE-2026-40083/templates/CVE-2026-40083.yaml:60
GET /managers.php
- Ports
- 8080, 8088
- Seen in
- 1 repo: hakaioffsec/CVE-2026-40083
- Evidence
- hakaioffsec/CVE-2026-40083/exploit/poc.py:53 hakaioffsec/CVE-2026-40083/exploit/poc.py:81 hakaioffsec/CVE-2026-40083/exploit/poc.py:117
POST /index.php
- Body markers
__csrf_magic=action=loginlogin_username=login_password=inapplication/x-www-form-urlencoded- Ports
- 8080, 8088
- Seen in
- 1 repo: hakaioffsec/CVE-2026-40083
- Evidence
- hakaioffsec/CVE-2026-40083/exploit/poc.py:64
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/managers\.php(?:[?#].*)?$
(?i)^/managers\.php(?:[?#].*)?$
(?i)^/index\.php(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080,8088] (msg:"GG PoC-Monitor CVE-2026-40083 Cacti cacti exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/managers.php"; http.header_names; content:"Cookie"; nocase; http.request_body; content:"__csrf_magic="; http.request_body; content:"action=save"; http.request_body; content:"tab=general"; http.request_body; content:"id=0"; http.request_body; content:"save_component_manager=1"; http.request_body; content:"description=poc"; http.request_body; content:"hostname=127.0.0.1"; http.request_body; content:"disabled="; http.request_body; content:"max_log_size=1"; http.request_body; content:"snmp_version=1"; http.request_body; content:"snmp_community=public"; http.request_body; content:"snmp_port=162"; http.request_body; content:"snmp_message_type=1"; http.request_body; content:"notes="; http.request_body; content:"action=actions"; http.request_body; content:"selected_items="; http.request_body; content:"drp_action=1"; http.request_body; content:"action_receivers=1"; http.request_body; content:"drp_action=2"; http.request_body; content:"selected_graphs_array="; http.request_body; content:"selected_items=a:1:"; http.request_body; content:"selected_graphs_array=a:2:"; reference:url,poc.griffinguard.io/cve/CVE-2026-40083; classtype:web-application-attack; sid:9340397; rev:1;)
alert http any any -> $HOME_NET [8080,8088] (msg:"GG PoC-Monitor CVE-2026-40083 Cacti cacti exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/managers.php"; reference:url,poc.griffinguard.io/cve/CVE-2026-40083; classtype:web-application-attack; sid:9099511; rev:1;)
alert http any any -> $HOME_NET [8080,8088] (msg:"GG PoC-Monitor CVE-2026-40083 Cacti cacti exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/index.php"; http.request_body; content:"__csrf_magic="; http.request_body; content:"action=login"; http.request_body; content:"login_username="; http.request_body; content:"login_password="; reference:url,poc.griffinguard.io/cve/CVE-2026-40083; classtype:web-application-attack; sid:9329271; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: Cacti cacti exploit attempt (CVE-2026-40083)
id: gg-pocmon-cve-2026-40083-9340397
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40083. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40083
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/managers.php'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40083
title: Cacti cacti exploit attempt (CVE-2026-40083)
id: gg-pocmon-cve-2026-40083-9099511
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40083. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40083
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/managers.php'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40083
title: Cacti cacti exploit attempt (CVE-2026-40083)
id: gg-pocmon-cve-2026-40083-9329271
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-40083. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-40083
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/index.php'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.40083