Cloudanix VulnDB

CVE-2024-31444

Medium · 4.6

CVSS

4.6

EPSS

14.7%

Published

May 14, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in the Cacti monitoring software lets attackers sneak code into web pages that administrators see, which could let them steal access or make unwanted changes.

Exploitation
Requires User Interaction
Attacker needs
Low Privilege
Complexity
Low
Impact
Data Tampering
Component
Application
Class
XSS
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Insufficient input validation in automation_tree_rules_form_save() allows unsanitized data to be concatenated into HTML output in form_confirm(), enabling reflected or stored cross-site scripting.

Why it matters to the business

Attackers can execute scripts in the browsers of logged-in administrators, potentially leading to session hijacking, unauthorized configuration changes, or data theft within the monitoring platform.

How an attack unfolds

An attacker with low-privileged access submits crafted input through the automation tree rules form; the unsanitized payload is later rendered as HTML when another user loads the confirmation page, executing arbitrary JavaScript in that user's context.

How to fix it

Upgrade cacti/cacti to the commit b577c294214b7e65a7273031ef8f0045d2a0c5af (version 1.2.27) or later; apply input sanitization to all form data before HTML concatenation and enforce content security policy headers.

How to confirm the fix worked

Verify the installed version against the fixed commit hash; attempt to reproduce the XSS payload in a test environment and confirm that the script is no longer executed; review change logs for the patch in automation_tree_rules.php and lib/html.php.

Typical attack path

  1. Locate a Cacti instance running a version prior to 1.2.27
  2. Authenticate with an account that can access automation_tree_rules.php
  3. Submit malicious payload via the automation_tree_rules_form_save function
  4. Induce a privileged user to view the affected confirmation form
  5. Execute client-side script to perform actions such as cookie theft or config modification

How to detect it

Review web server access logs and application logs for unusual parameters submitted to automation_tree_rules.php; inspect browser developer tools or proxy captures for unexpected script tags in form confirmation responses; monitor for anomalous admin session behavior after form interactions.

What your security team should do

  • Immediately upgrade all Cacti installations to version 1.2.27 or the equivalent fixed commit
  • Audit and restrict accounts that have access to automation tree rule forms
  • Implement web application firewall rules to block common XSS patterns targeting monitoring dashboards
  • Enable content security policy headers to limit script execution sources

The record

Cacti provides an operational monitoring and fault management framework. Prior to version 1.2.27, some of the data stored in `automation_tree_rules_form_save()` function in `automation_tree_rules.php` is not thoroughly checked and is used to concatenate the HTML statement in `form_confirm()` function from `lib/html.php` , finally resulting in cross-site scripting. Version 1.2.27 contains a patch for the issue.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 cacti 0 1.2.16+ds1-2+deb11u4
Debian:12 cacti 0 1.2.24+ds1-1+deb12u3
Debian:13 cacti 0 1.2.27+ds1-1
SUSE:Package Hub 12 cacti 0 1.2.27-bp155.2.9.1
SUSE:Package Hub 12 cacti-spine 0 1.2.27-bp155.2.9.1
SUSE:Package Hub 15 SP5 cacti 0 1.2.27-bp155.2.9.1
SUSE:Package Hub 15 SP5 cacti-spine 0 1.2.27-bp155.2.9.1
SUSE:Package Hub 15 SP6 cacti 0 1.2.27-bp156.2.3.1
SUSE:Package Hub 15 SP6 cacti-spine 0 1.2.27-bp156.2.3.1
Ubuntu:20.04:LTS cacti 0 No fix
Ubuntu:20.04:LTS cacti 0 1.2.10+ds1-1ubuntu1.1
Ubuntu:22.04:LTS cacti 0 No fix
Ubuntu:22.04:LTS cacti 0 1.2.19+ds1-2ubuntu1.1
Ubuntu:24.04:LTS cacti 0 No fix
Ubuntu:24.04:LTS cacti 0 1.2.26+ds1-1ubuntu0.1
Ubuntu:Pro:14.04:LTS cacti 0 No fix
Ubuntu:Pro:14.04:LTS cacti 0 0.8.8b+dfsg-5ubuntu0.2+esm2
Ubuntu:Pro:16.04:LTS cacti 0 No fix
Ubuntu:Pro:16.04:LTS cacti 0 0.8.8f+ds1-4ubuntu4.16.04.2+esm2
Ubuntu:Pro:18.04:LTS cacti 0 No fix
Ubuntu:Pro:18.04:LTS cacti 0 1.1.38+ds1-1ubuntu0.1~esm3
openSUSE:Leap 15.5 cacti 0 1.2.27-bp155.2.9.1
openSUSE:Leap 15.5 cacti-spine 0 1.2.27-bp155.2.9.1
openSUSE:Leap 15.6 cacti 0 1.2.27-bp156.2.3.1
openSUSE:Leap 15.6 cacti-spine 0 1.2.27-bp156.2.3.1
openSUSE:Tumbleweed cacti 0 1.2.27-1.1

Related vulnerabilities