---
id: "CVE-2026-46531"
kind: "vulnerability"
aliases: ["CVE-2026-46531"]
title: "Cacti: stored SQL injection through automation tree rules, fixed in 1.2.31"
severity: "medium"
cvss: 5.5
epss: 0.00346
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cacti", "monitoring", "package", "self-hosted"]
not_affected_if: ["automation-realm-restricted", "version-1.2.31-or-later", "version-below-1.2.27"]
published_at: "2026-10-23T15:17:31+00:00"
first_seen_at: "2026-10-23T21:57:34+00:00"
updated_at: "2026-10-25T12:38:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-46531", "first_seen_at": "2026-10-23T21:57:34+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-46531", "first_seen_at": "2026-10-25T12:38:50+00:00"}]
---

# Cacti: stored SQL injection through automation tree rules, fixed in 1.2.31

Cacti versions 1.2.27 up to 1.2.31 let a user with the Automation permission store a SQL fragment in an automation tree rule that is later run unsanitized against the database. The injected query output is written into the Cacti tree UI, which gives the attacker a way to read data from the database.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Cacti version in the web UI footer or in `include/global.php` (look for `$config['cacti_version']`).
- In the Cacti UI, review Automation tree rules for unexpected entries if you suspect misuse.

## Fix

- Upgrade Cacti to `1.2.31` or later.
- Until upgraded, restrict the Automation realm to trusted users only.

## Timeline

- 2026-10-23T21:57:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-46531
- 2026-10-25T12:38:50+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-46531

## From the sources

Cacti is an open source performance and fault management framework. From version 1.2.27 to before version 1.2.31, Cacti contains an authenticated stored second-order SQL injection in the automation tree rule item handler. A user holding the Automation realm (default General Administration role) can persist an arbitrary SQL fragment in the automation_tree_rule_items.field column. The fragment is later concatenated directly into a SELECT ... AS source FROM ... clause in lib/api_automation.php :: create_all_header_nodes() and executed when an administrator triggers automation via the standard graphs.php?action=actions&drp_action=8 ("Apply Automation Rules") bulk action. The result of the injected SELECT is written into graph_tree_items.title and rendered in the Cacti tree UI, providing a direct exfiltration channe. This issue has been patched in version 1.2.31.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
