Skip to content
Heist/ feed
Back to feed
High

Cacti: Command Injection via escape_command() no-op in RRDtool execution

Type: advisorySources: OSV

Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior are vulnerable to Command Injection due to lack of sanitization in the escape_command() function. The escape_command() function at lib/rrd.php is a no-op: it returns $command unchanged. The command line built by rrdtool_function_graph() is passed through this function and then to shell_exec($full_commandline). The risk is in __rrd_execute() where text_format values from graph templates (which may contain host variable substitutions) reach shell_exec without adequate escaping. This issue has been addressed in version 1.2.31.

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

Source evidence

Cacti: Command Injection via escape_command() no-op in RRDtool execution

core-osv · Original source

Published 24 Jun 2026, 23:26 UTC

Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior are vulnerable to Command Injection due to lack of sanitization in the escape_command() function. The escape_command() function at lib/rrd.php is a no-op: it returns $command unchanged. The command line built by rrdtool_function_graph() is passed through this function and then to shell_exec($full_commandline). The risk is in __rrd_execute() where text_format values from graph templates (which may contain host variable substitutions) reach shell_exec without adequate escaping. This issue has been addressed in version 1.2.31.

osv:CVE-2026-40079
Complete source record
{
  "id": "f5bc8b4181cd182d660442c1c9cd7aa805bbe1d1a9af5cebcd32276faf5c6cd3",
  "url": "https://osv.dev/vulnerability/CVE-2026-40079",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cacti: Command Injection via escape_command() no-op in RRDtool execution",
    "summary": "Cacti is an open source performance and fault management framework. Versions 1.2.30 and prior are vulnerable to Command Injection due to lack of sanitization in the escape_command() function. The escape_command() function at lib/rrd.php is a no-op: it returns $command unchanged. The command line built by rrdtool_function_graph() is passed through this function and then to shell_exec($full_commandline). The risk is in __rrd_execute() where text_format values from graph templates (which may contain host variable substitutions) reach shell_exec without adequate escaping. This issue has been addressed in version 1.2.31.",
    "evidence": "osv:CVE-2026-40079",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-40079",
      "aliases": [
        "CVE-2026-40079",
        "GHSA-xq98-376r-hv9j"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cacti/cacti",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1e8eaca26b84b128c39ce8cc8ece42d7ff76aac1"
                },
                {
                  "fixed": "4c09efaebf3a9faec66969d0b5c4aceaf397f37f"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:cacti:cacti:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.2.31"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "4c09efaebf3a9faec66969d0b5c4aceaf397f37f"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "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-40079.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.223067029Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40079.json",
        "https://github.com/Cacti/cacti/security/advisories/GHSA-xq98-376r-hv9j",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40079",
        "https://github.com/Cacti/cacti/commit/4c09efaebf3a9faec66969d0b5c4aceaf397f37f"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-78",
          "CWE-88"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40079.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40079",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 500365,
  "published_at": "2026-06-24T23:26:40.623+00:00"
}