CVE-2026-31858: CraftCMS's `ElementSearchController` Affected by Blind SQL Injection

Published Mar 11, 2026
·
Updated

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.

Other sources

The ElementSearchController::actionSearch() endpoint is missing the unset() protection that was added to ElementIndexesController in GHSA-2453-mppf-46cj.

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.

GitHub

Affected Software

4 affected componentsFixes available
composer/craftcms/cms>=5.0.0-RC1<=5.9.8
5.9.9
CraftCMS Craft CMS>=5.0.1<5.9.9
CraftCMS Craft CMS=5.0.0
CraftCMS Craft CMS=5.0.0-rc1

Event History

Mar 11, 2026
Advisory Published
via GitHub·12:27 AM
Data Sourced
via GitHub·12:27 AM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·05:35 PM
Data Sourced
via MITRE·05:35 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
RemedyAffected Software
Nov 20, 58180
Event
via FIRST·04:29 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-31858?

CVE-2026-31858 is classified as a moderate severity SQL injection vulnerability.

2

How do I fix CVE-2026-31858?

To fix CVE-2026-31858, update the Craft CMS package to version 5.9.9 or later.

3

What causes CVE-2026-31858?

CVE-2026-31858 is caused by the missing unset() protection in the ElementSearchController::actionSearch() endpoint.

4

What versions are affected by CVE-2026-31858?

CVE-2026-31858 affects Craft CMS versions from 5.0.0-RC1 up to 5.9.8.

5

Is CVE-2026-31858 a known vulnerability?

Yes, CVE-2026-31858 is a known vulnerability that has been publicly disclosed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203