Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-31858: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in craftcms cms

0
High
VulnerabilityCVE-2026-31858cvecve-2026-31858cwe-89
Published: Wed Mar 11 2026 (03/11/2026, 17:35:07 UTC)
Source: CVE Database V5
Vendor/Project: craftcms
Product: cms

Description

Craft is a content management system (CMS). The ElementSearchController::actionSearch() endpoint is missing the unset() protection that was added to ElementIndexesController in CVE-2026-25495. The exact same SQL injection vulnerability (including criteria[orderBy], the original advisory vector) works on this controller because the fix was never applied to it. Any authenticated control panel user (no admin required) can inject arbitrary SQL via criteria[where], criteria[orderBy], or other query properties, and extract the full database contents via boolean-based blind injection. Users should update to the patched 5.9.9 release to mitigate the issue.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/18/2026, 19:14:24 UTC

Technical Analysis

CVE-2026-31858 is a critical SQL injection vulnerability affecting the Craft CMS platform, specifically versions from 5.0.0-RC1 up to 5.9.8. The vulnerability resides in the ElementSearchController::actionSearch() endpoint, which processes user-supplied query parameters such as criteria[where] and criteria[orderBy] without proper neutralization of special SQL elements. This improper input validation allows an authenticated user with control panel access—without requiring administrative privileges—to inject arbitrary SQL commands. The vulnerability is a result of the absence of an unset() protection mechanism that was previously implemented in another controller (ElementIndexesController) to address a similar issue (CVE-2026-25495). Exploiting this flaw enables attackers to perform boolean-based blind SQL injection attacks, allowing them to enumerate and extract sensitive database information, potentially including user credentials, configuration data, and other critical content managed by the CMS. The attack vector is network-based, does not require user interaction, and can be executed with low complexity due to the lack of required privileges beyond authenticated access. The CVSS v4.0 score of 8.7 reflects the high impact on confidentiality, integrity, and availability, combined with the ease of exploitation. Although no active exploits have been reported in the wild, the vulnerability poses a significant risk to organizations relying on Craft CMS for content management. The recommended remediation is to upgrade to Craft CMS version 5.9.9, where the missing protection has been applied to this endpoint, effectively mitigating the vulnerability.

Potential Impact

The exploitation of CVE-2026-31858 can have severe consequences for organizations using affected versions of Craft CMS. Attackers with authenticated control panel access can extract the entire database contents, leading to a complete breach of confidentiality. This may include sensitive user data, credentials, proprietary content, and configuration settings. The integrity of the CMS data can be compromised by unauthorized modifications through injected SQL commands, potentially defacing websites or injecting malicious content. Availability may also be impacted if attackers execute destructive SQL commands or cause database corruption. Since the vulnerability requires only authenticated access without admin privileges, insider threats or compromised lower-privilege accounts can be leveraged to escalate the attack. The breach of sensitive data can lead to regulatory non-compliance, reputational damage, financial losses, and further lateral movement within the victim's network. Organizations relying on Craft CMS for public-facing websites or internal portals are at risk of data leakage and service disruption until the vulnerability is patched.

Mitigation Recommendations

1. Immediate upgrade to Craft CMS version 5.9.9 or later, where the vulnerability is patched. 2. Restrict control panel access to trusted users only and enforce strong authentication mechanisms, such as multi-factor authentication, to reduce the risk of compromised accounts. 3. Implement web application firewalls (WAFs) with custom rules to detect and block suspicious SQL injection patterns targeting criteria parameters in the CMS endpoints. 4. Conduct regular security audits and code reviews to ensure all input validation and sanitization measures are consistently applied across all controllers and endpoints. 5. Monitor logs for unusual query patterns or failed login attempts that may indicate exploitation attempts. 6. Limit database user privileges used by the CMS to the minimum necessary, preventing execution of arbitrary commands beyond required operations. 7. Educate CMS users about the risks of credential compromise and enforce strong password policies. 8. Consider network segmentation to isolate CMS infrastructure from critical backend systems to limit lateral movement in case of compromise.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-09T19:02:25.011Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69b1b88b2f860ef9436021c1

Added to database: 3/11/2026, 6:46:35 PM

Last enriched: 3/18/2026, 7:14:24 PM

Last updated: 4/28/2026, 7:27:30 AM

Views: 93

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses