CVE-2024-43362

7.3 HIGH

📋 TL;DR

This stored XSS vulnerability in Cacti allows authenticated users with external link creation privileges to inject malicious scripts into web pages. When other users view pages containing these manipulated links, the scripts execute in their browsers, potentially stealing session cookies or performing actions on their behalf. All Cacti installations below version 1.2.28 are affected.

💻 Affected Systems

Products:
  • Cacti
Versions: All versions before 1.2.28
Operating Systems: All platforms running Cacti
Default Config Vulnerable: ⚠️ Yes
Notes: Requires user account with 'External Links' creation privilege. Default installations include this privilege for some user roles.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could steal administrator session cookies, gain full administrative access to Cacti, pivot to other systems, or deploy ransomware across monitored infrastructure.

🟠

Likely Case

Attackers with valid user accounts could steal other users' session cookies, perform unauthorized actions within Cacti, or redirect users to malicious sites.

🟢

If Mitigated

With proper input validation and output encoding, the malicious scripts would be rendered harmless as text rather than executable code.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access with specific privileges. The vulnerability is straightforward to exploit once an attacker has valid credentials.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2.28

Vendor Advisory: https://github.com/Cacti/cacti/security/advisories/GHSA-wh9c-v56x-v77c

Restart Required: No

Instructions:

1. Backup your Cacti database and configuration files. 2. Download Cacti 1.2.28 from the official repository. 3. Replace existing Cacti files with the new version. 4. Verify the installation is working correctly.

🔧 Temporary Workarounds

Remove External Link Creation Privileges

all

Temporarily revoke 'External Links' creation privileges from all non-administrative users to prevent exploitation.

UPDATE user_auth SET policy_graphs = policy_graphs & ~(1 << 5) WHERE realm_id != 1;

🧯 If You Can't Patch

  • Implement strict input validation on the fileurl parameter using allowlists of permitted characters
  • Add Content Security Policy headers to restrict script execution sources

🔍 How to Verify

Check if Vulnerable:

Check Cacti version via web interface or examine include/global.php for version number

Check Version:

grep '\$config\["cacti_version"\]' include/global.php

Verify Fix Applied:

Verify version is 1.2.28 or higher and test that fileurl parameter input is properly sanitized

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to links.php with JavaScript in fileurl parameter
  • Multiple failed login attempts followed by successful login and link creation

Network Indicators:

  • HTTP POST requests containing script tags or JavaScript in fileurl parameter

SIEM Query:

source="cacti_access.log" AND (uri_path="/links.php" OR uri_path="/link.php") AND (fileurl CONTAINS "<script>" OR fileurl CONTAINS "javascript:")

🔗 References

📤 Share & Export