The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-2026-31858

CVE-2026-31858: Craft CMS SQL Injection Vulnerability

CVE-2026-31858 is a SQL injection flaw in Craft CMS that lets authenticated users extract database contents via boolean-based blind injection. This article covers technical details, affected versions, and mitigation.

Published: March 13, 2026

CVE-2026-31858 Overview

CVE-2026-31858 is a SQL Injection vulnerability affecting Craft CMS, a popular content management system. The vulnerability exists in the ElementSearchController::actionSearch() endpoint, which is missing the unset() protection that was previously added to ElementIndexesController as part of the fix for CVE-2026-25495. This incomplete patch application means the exact same SQL injection attack vector remains exploitable through a different controller endpoint.

Critical Impact

Any authenticated control panel user (no admin privileges required) can inject arbitrary SQL via criteria[where], criteria[orderBy], or other query properties, potentially extracting full database contents via boolean-based blind injection.

Affected Products

  • Craft CMS versions prior to 5.9.9

Discovery Timeline

  • 2026-03-11 - CVE-2026-31858 published to NVD
  • 2026-03-12 - Last updated in NVD database

Technical Details for CVE-2026-31858

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) stems from an incomplete security fix implementation across Craft CMS controller endpoints. When CVE-2026-25495 was addressed, the unset() protection was applied to ElementIndexesController to sanitize user-controlled query criteria parameters. However, the ElementSearchController::actionSearch() endpoint was overlooked, leaving it vulnerable to the identical attack methodology.

The vulnerability allows authenticated users with access to the control panel to manipulate SQL queries through specially crafted criteria parameters. The attack can be performed via criteria[orderBy], criteria[where], or other query properties that are directly incorporated into database queries without proper sanitization. Exploitation enables boolean-based blind SQL injection, allowing attackers to systematically extract sensitive data from the entire database through conditional query responses.

Root Cause

The root cause is an incomplete security patch where the unset() protection mechanism was not uniformly applied across all affected controller endpoints. While the original vulnerability in ElementIndexesController was patched for CVE-2026-25495, the developers failed to identify and remediate the same vulnerable code pattern in ElementSearchController::actionSearch(). This represents a common security anti-pattern where similar vulnerable code exists in multiple locations but patches are applied inconsistently.

Attack Vector

The attack is network-based and requires low-privilege authentication (any control panel user). An attacker can craft malicious HTTP requests to the ElementSearchController::actionSearch() endpoint, injecting SQL syntax through the criteria parameters. Since no administrative privileges are required, any user with basic control panel access can exploit this vulnerability.

The attack proceeds through boolean-based blind injection techniques, where the attacker sends conditional SQL statements and observes application responses to infer database contents one bit at a time. This method, while slower than direct data extraction, allows complete database enumeration without requiring direct output of query results.

For technical details on the vulnerability and patch implementation, see the GitHub Security Advisory.

Detection Methods for CVE-2026-31858

Indicators of Compromise

  • Unusual requests to the ElementSearchController::actionSearch() endpoint containing SQL syntax in criteria parameters
  • HTTP requests with criteria[orderBy], criteria[where], or similar parameters containing SQL operators like CASE, WHEN, SELECT, or UNION
  • Repeated requests to the search endpoint with slight variations in parameter values (indicative of blind injection probing)
  • Database query logs showing malformed or injected SQL statements originating from the element search functionality

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in HTTP request parameters targeting Craft CMS endpoints
  • Monitor application logs for requests to /actions/element-indexes/get-elements or similar search controller endpoints with suspicious criteria parameters
  • Deploy database activity monitoring to identify anomalous query patterns or unauthorized data access attempts
  • Utilize SentinelOne's Singularity XDR to correlate web server activity with database access patterns for early detection of exploitation attempts

Monitoring Recommendations

  • Enable detailed logging for all control panel user activities, particularly search and element query operations
  • Set up alerting for high-frequency requests to the element search endpoint from single user sessions
  • Monitor for database query response time anomalies that may indicate blind SQL injection timing attacks
  • Review access logs for authenticated users making unusual numbers of search requests

How to Mitigate CVE-2026-31858

Immediate Actions Required

  • Update Craft CMS to version 5.9.9 or later immediately
  • Audit control panel user accounts and remove unnecessary access privileges
  • Review database access logs for signs of prior exploitation
  • Implement network segmentation to limit database access from web application servers

Patch Information

Craft CMS has released version 5.9.9 which addresses this vulnerability by applying the unset() protection to the ElementSearchController::actionSearch() endpoint. The fix ensures that user-controlled criteria parameters are properly sanitized before being incorporated into database queries.

The patch can be reviewed in the GitHub Commit. Additional details are available in the GitHub Security Advisory.

Workarounds

  • If immediate patching is not possible, restrict control panel access to trusted administrators only through IP allowlisting or VPN requirements
  • Implement a Web Application Firewall (WAF) with rules to block SQL injection patterns in request parameters
  • Disable or restrict access to the element search functionality at the web server level until patching can be completed
  • Monitor all control panel user activity closely and implement additional authentication requirements such as multi-factor authentication
bash
# Example: Restrict access to Craft CMS admin panel by IP (nginx)
location /admin {
    allow 192.168.1.0/24;
    allow 10.0.0.0/8;
    deny all;
}

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechCraft

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-25495: Craft CMS SQL Injection Vulnerability

  • CVE-2026-27126: Craft CMS Stored XSS Vulnerability

  • CVE-2026-25491: Craft CMS Stored XSS Vulnerability

  • CVE-2026-25496: Craft CMS Stored XSS Vulnerability
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