CraftCMS's `ElementSearchController` Affected by Blind SQL Injection
Published 11 Mar 2026 · Updated 13 Mar 2026
Affected package
- Affected
- >=5.0.0-RC1 <5.9.9
- Fixed in
- 5.9.9
composer require craftcms/cms:^5.9.9Details
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.
Is GHSA-g7j6-fmwx-7vp8 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected craftcms/cms, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.