Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-26520

CVE-2025-26520: Cacti SQL Injection Vulnerability

CVE-2025-26520 is a SQL injection flaw in Cacti through 1.2.29 affecting the template function in host_templates.php. This vulnerability allows attackers to execute malicious SQL queries via the graph_template parameter.

Published: March 18, 2026

CVE-2025-26520 Overview

CVE-2025-26520 is a SQL injection vulnerability affecting Cacti, the popular open-source network monitoring and graphing solution. This vulnerability exists in the template function within host_templates.php and can be exploited through the graph_template parameter. Notably, this issue arose due to an incomplete fix for a previously addressed vulnerability (CVE-2024-54146).

Critical Impact

This SQL injection vulnerability allows unauthenticated remote attackers to execute arbitrary SQL commands against the Cacti database, potentially leading to complete database compromise, data exfiltration, unauthorized data modification, and further system access.

Affected Products

  • Cacti through version 1.2.29
  • All Cacti installations using vulnerable host_templates.php functionality
  • Environments with the host templates graph_template filtering feature enabled

Discovery Timeline

  • 2025-02-12 - CVE-2025-26520 published to NVD
  • 2025-03-03 - Last updated in NVD database

Technical Details for CVE-2025-26520

Vulnerability Analysis

This SQL injection vulnerability exists in the template function of host_templates.php. The root cause is the improper handling of the graph_template parameter when constructing SQL queries. The vulnerable code uses get_request_var() to retrieve user-supplied input and directly concatenates it into the SQL WHERE clause without proper sanitization or parameterization.

The issue is particularly noteworthy because it represents an incomplete remediation of CVE-2024-54146. While the original vulnerability was addressed, this specific code path was missed or improperly fixed, allowing attackers to still inject malicious SQL commands through the graph_template parameter.

Root Cause

The vulnerability stems from insufficient input validation when handling the graph_template request variable. The code retrieves the parameter using get_request_var('graph_template') which does not perform proper sanitization for SQL queries. This value is then directly concatenated into a SQL WHERE clause as (gt_id = ' . get_request_var('graph_template') . ')', creating a classic SQL injection vector.

The fix requires using get_filter_request_var() instead, which applies appropriate input filtering and sanitization before the value is used in database operations.

Attack Vector

An attacker can exploit this vulnerability by sending a crafted HTTP request to the Cacti web interface with a malicious graph_template parameter value. Since this is a network-accessible vulnerability requiring no authentication or user interaction, exploitation can be performed remotely. The attacker could inject arbitrary SQL statements to:

  • Extract sensitive data from the database including user credentials
  • Modify or delete database records
  • Potentially achieve code execution through database-specific features
  • Escalate privileges within the Cacti application
php
// Vulnerable code - uses unsanitized get_request_var()
if (get_request_var('graph_template') != '-1') {
	$sql_where .= ($sql_where != '' ? ' AND ':'WHERE ') . '(gt_id = ' . get_request_var('graph_template') . ')';
	$sql_join   = "INNER JOIN (
		SELECT DISTINCT host_template_id, id AS gt_id
		FROM (";

// Fixed code - uses sanitized get_filter_request_var()
if (get_request_var('graph_template') != '-1') {
	$sql_where .= ($sql_where != '' ? ' AND ':'WHERE ') . '(gt_id = ' . get_filter_request_var('graph_template') . ')';
	$sql_join   = "INNER JOIN (
		SELECT DISTINCT host_template_id, id AS gt_id
		FROM (";

Source: GitHub Cacti Commit

Detection Methods for CVE-2025-26520

Indicators of Compromise

  • Unusual SQL error messages or database exceptions in Cacti application logs
  • HTTP requests to host_templates.php with anomalous graph_template parameter values containing SQL syntax (e.g., quotes, UNION, SELECT keywords)
  • Unexpected database queries or access patterns in database audit logs
  • Evidence of data exfiltration or unauthorized database modifications

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in the graph_template parameter
  • Monitor HTTP access logs for requests to host_templates.php containing SQL metacharacters or keywords
  • Deploy database activity monitoring to detect anomalous query patterns originating from the Cacti application
  • Configure intrusion detection systems (IDS) with signatures for SQL injection attempts targeting Cacti endpoints

Monitoring Recommendations

  • Enable detailed logging for the Cacti application and web server access logs
  • Implement real-time alerting for SQL injection pattern matches in request parameters
  • Monitor database query logs for unusual or unauthorized SELECT, UNION, or data extraction operations
  • Review authentication and authorization logs for signs of privilege escalation following potential exploitation

How to Mitigate CVE-2025-26520

Immediate Actions Required

  • Update Cacti to a version containing the security fix (commit 7fa60c03ad4a69c701ac6b77c85a8927df7acd51 or later)
  • If immediate patching is not possible, restrict network access to the Cacti web interface to trusted IP addresses only
  • Deploy WAF rules to block SQL injection attempts targeting the graph_template parameter
  • Review database and application logs for signs of prior exploitation

Patch Information

The vulnerability has been addressed by the Cacti development team. The fix replaces the vulnerable get_request_var() function call with get_filter_request_var(), which properly sanitizes the graph_template parameter before use in SQL queries.

Organizations should apply the patch available in GitHub Pull Request #6096 or update to a Cacti version that incorporates commit 7fa60c03ad4a69c701ac6b77c85a8927df7acd51.

Workarounds

  • Implement network-level access controls to restrict access to Cacti from trusted networks only
  • Deploy a Web Application Firewall with SQL injection detection capabilities in front of the Cacti application
  • Disable or restrict access to the host templates functionality if not required for operations
  • Apply the principle of least privilege to the database user account used by Cacti
bash
# Example: Restrict access to Cacti using Apache configuration
<Directory "/var/www/html/cacti">
    # Allow only trusted internal networks
    Require ip 10.0.0.0/8
    Require ip 192.168.0.0/16
    # Deny all other access
    Require all denied
</Directory>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechCacti

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.12%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Cacti Pull Request
  • Vendor Resources
  • GitHub Cacti Commit Update
  • Related CVEs
  • CVE-2025-24368: Cacti SQL Injection Vulnerability

  • CVE-2020-14295: Cacti SQL Injection Vulnerability

  • CVE-2025-45160: Cacti File Upload XSS Vulnerability

  • CVE-2024-34340: Cacti Authentication Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English