Skip to content
Heist/ feed
Back to feed
High

Cacti: SQL Injection in managers.php

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40083
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 18:29 UTC · Revision 1

Source evidence

Cacti: SQL Injection in managers.php

core-osv · Original source

Published 25 Jun 2026, 22:39 UTC

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.

osv:CVE-2026-40083
Complete source record
{
  "id": "869ce5652031720e95bac315139848e9a9a575bb65151cf0bd6b17071516a386",
  "url": "https://osv.dev/vulnerability/CVE-2026-40083",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cacti: SQL Injection in managers.php",
    "summary": "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.",
    "evidence": "osv:CVE-2026-40083",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-40083",
      "aliases": [
        "CVE-2026-40083",
        "GHSA-j9jv-6xjq-9hhj"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cacti/cacti",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1e8eaca26b84b128c39ce8cc8ece42d7ff76aac1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.2.31"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:cacti:cacti:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.2.31"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "release/1.2.30",
            "release/1.2.29",
            "release/1.2.28",
            "release/1.2.27",
            "release/1.2.26",
            "release/1.2.25",
            "release/1.2.24",
            "release/1.2.23",
            "release/1.2.22",
            "release/1.2.21",
            "release/1.2.20",
            "release/1.2.19",
            "releaes/1.2.19",
            "release/1.2.18",
            "release/1.2.17",
            "rel-1.2.17",
            "release/1.2.16",
            "release/1.2.15",
            "release/1.2.14",
            "release/1.2.13",
            "release/1.2.12",
            "release/1.2.11",
            "release/1.2.10",
            "release/1.2.9",
            "release/1.2.8",
            "release/1.2.7",
            "release/1.2.6",
            "release/1.2.5",
            "release/1.2.4",
            "release/1.2.3",
            "release/1.2.2",
            "release/1.2.1",
            "release/1.2.0",
            "release/1.1.38",
            "release/1.1.37",
            "release/1.1.36",
            "release/1.1.35",
            "release/1.1.34",
            "release/1.1.33",
            "release/1.1.32",
            "release/1.1.31",
            "release/1.1.30",
            "release/1.1.29",
            "release/1.1.28",
            "release/1.1.27",
            "release/1.1.26",
            "release/1.1.25",
            "release/1.1.24",
            "release/1.1.23",
            "release/1.1.22",
            "release/1.1.21",
            "release/1.1.20",
            "release/1.1.19",
            "release/1.1.18",
            "release/1.1.17",
            "release/1.1.16",
            "release/1.1.15",
            "release/1.1.14",
            "release/1.1.13",
            "release/1.1.12",
            "release/1.1.11",
            "release/1.1.8",
            "release/1.1.7",
            "release/1.1.6",
            "release/1.1.5",
            "release/1.1.4",
            "release/1.1.3",
            "release/1.1.2",
            "release/1.1.1",
            "release/1.1.0",
            "release/1.0.6",
            "release/1.0.5",
            "release/1.0.4",
            "release/1.0.3",
            "release/1.0.2",
            "release/1.0.1",
            "release/1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40083.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:38.503237418Z",
      "provider": "osv",
      "references": [
        "https://github.com/Cacti/cacti/releases/tag/release%2F1.2.31",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40083.json",
        "https://github.com/Cacti/cacti/security/advisories/GHSA-j9jv-6xjq-9hhj",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40083"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-89"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40083.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40083",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 505707,
  "published_at": "2026-06-25T22:39:17.541+00:00"
}