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-2021-39165

CVE-2021-39165: Cachet Status Page SQLi Vulnerability

CVE-2021-39165 is an unauthenticated SQL injection flaw in Cachet status page that allows attackers to exfiltrate sensitive database data including admin credentials. This article covers technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-39165 Overview

CVE-2021-39165 is a SQL Injection vulnerability affecting Cachet, an open source status page application. The vulnerability exists in the SearchableTrait#scopeSearch() function, allowing attackers without authentication to exploit this flaw and exfiltrate sensitive data from the database, including administrator passwords and session information. This vulnerability affects Cachet versions up to and including 2.3.18, as well as the developing 2.4 branch.

Critical Impact

Unauthenticated attackers can extract sensitive database contents including administrator credentials and session data, potentially leading to full system compromise.

Affected Products

  • Cachet versions up to and including 2.3.18
  • Cachet 2.4 development branch
  • All CachetHQ Cachet deployments using the vulnerable SearchableTrait

Discovery Timeline

  • 2021-08-26 - CVE-2021-39165 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-39165

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) resides in the SearchableTrait#scopeSearch() method within the Cachet application. The vulnerability allows unauthenticated remote attackers to inject arbitrary SQL commands through network-accessible endpoints. When exploited, attackers can bypass normal application logic and directly interact with the underlying database, enabling the extraction of highly sensitive information such as administrator passwords and active session tokens.

The flaw exists because the application fails to properly validate and sanitize search parameters before incorporating them into database queries. While the original code checked if search keys intersected with allowed searchable columns, it did not properly filter out malicious keys from the search array before passing it to the database query builder.

Root Cause

The root cause of CVE-2021-39165 lies in improper input validation within the scopeSearch() method. The vulnerable code used array_intersect() to check if any search keys matched the allowed searchable columns, but still passed the entire unfiltered $search array to the $query->where() method. This allowed attackers to include additional malicious parameters that would be directly incorporated into the SQL query, bypassing the intended column restrictions.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can craft malicious HTTP requests containing specially crafted search parameters that exploit the improper input validation. These parameters are processed by the scopeSearch() method and injected directly into SQL queries, allowing the attacker to:

  1. Extract administrator credentials from the users table
  2. Retrieve active session tokens for session hijacking
  3. Access any other sensitive data stored in the database
  4. Potentially modify or delete database records depending on database permissions
php
// Security patch in app/Models/Traits/SearchableTrait.php
// Ensure only allowed searchable columns are used in DB Query
             return $query;
         }
 
-        if (!array_intersect(array_keys($search), $this->searchable)) {
+        $allowed_search = array_intersect_key($search, array_flip($this->searchable));
+        if (! $allowed_search) {
             return $query;
         }
 
-        return $query->where($search);
+        return $query->where($allowed_search);
     }
 }

Source: GitHub Commit Details

Detection Methods for CVE-2021-39165

Indicators of Compromise

  • Unusual search queries containing SQL metacharacters (single quotes, semicolons, UNION statements) in application logs
  • Database query logs showing unexpected queries targeting the users table or session storage
  • Anomalous data extraction patterns in network traffic from the Cachet application
  • Failed or successful authentication attempts using credentials not entered through normal login flows

Detection Strategies

  • Monitor web application logs for search requests containing SQL injection patterns such as ' OR 1=1, UNION SELECT, or time-based blind injection attempts
  • Implement Web Application Firewall (WAF) rules to detect and block SQL injection attempts targeting search functionality
  • Review database audit logs for queries that access sensitive tables outside of normal application behavior
  • Deploy intrusion detection signatures for common SQL injection attack patterns

Monitoring Recommendations

  • Enable verbose logging on the Cachet application to capture all search query parameters
  • Configure database query logging to identify suspicious or malformed SQL statements
  • Set up alerts for multiple failed database queries that may indicate SQL injection probing
  • Monitor for large data transfers from the database server that could indicate data exfiltration

How to Mitigate CVE-2021-39165

Immediate Actions Required

  • Upgrade to a patched version of Cachet that includes the fix from commit 27bca8280419966ba80c6fa283d985ddffa84bb6
  • If running the original CachetHQ repository, migrate to the fiveai/Cachet fork which contains the security patch
  • Review database access logs for any signs of prior exploitation
  • Rotate all administrator passwords and invalidate existing sessions as a precautionary measure

Patch Information

The vulnerability has been addressed in the fiveai/Cachet fork. The patch modifies the SearchableTrait.php file to properly filter search parameters using array_intersect_key() with the allowed searchable columns before passing them to the database query. This ensures that only whitelisted column names can be included in the WHERE clause, preventing SQL injection through unauthorized parameters.

The fix can be found at the GitHub Commit Details. For additional security context, refer to the GitHub Security Advisory GHSA-79mg-4w23-4fqc.

Note: The original CachetHQ/Cachet repository is no longer actively maintained, so users should consider migrating to an actively maintained fork.

Workarounds

  • Implement a Web Application Firewall (WAF) with SQL injection detection rules as a temporary protective measure
  • Restrict network access to the Cachet application to trusted IP ranges if public access is not required
  • Add input validation at the reverse proxy or load balancer level to filter suspicious search parameters
  • Consider temporarily disabling search functionality if immediate patching is not possible
bash
# Configuration example - WAF rule for SQL injection detection (ModSecurity)
# Add to your ModSecurity configuration to help detect SQL injection attempts
SecRule ARGS "@detectSQLi" \
    "id:1001,\
    phase:2,\
    block,\
    msg:'SQL Injection Attack Detected in Cachet Search',\
    log,\
    tag:'CVE-2021-39165'"

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechCachet

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability89.38%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Security Advisory GHSA-79mg-4w23-4fqc
  • Vendor Resources
  • GitHub Commit Details
  • Latest CVEs
  • CVE-2025-49454: TinySalt Path Traversal Vulnerability

  • CVE-2025-48261: MultiVendorX Information Disclosure Flaw

  • CVE-2025-32119: CardGate WooCommerce SQL Injection Flaw

  • CVE-2025-26879: s2Member Plugin Reflected XSS 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