CVE-2026-31858
HIGH 8.7CVSS 4.0CraftCMS's `ElementSearchController` Affected by Blind SQL Injection
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.
- Published
- 11 Mar 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-89
- Also known as
- GHSA-g7j6-fmwx-7vp8
- Sources
- NVDJSONOSV GHSA-g7j6-fmwx-7vp8JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | HIGH 8.7 | 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | craftcms | craft_cmscpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:* |
>= 5.0.1, < 5.9.9 | 5.9.9 |
| NVD | craftcms | craft_cmscpe:2.3:a:craftcms:craft_cms:5.0.0:-:*:*:*:*:*:* |
= 5.0.0 | |
| NVD | craftcms | craft_cmscpe:2.3:a:craftcms:craft_cms:5.0.0:rc1:*:*:*:*:*:* |
= 5.0.0 | |
| OSV | Packagist | craftcms/cms | >= 5.0.0-RC1, < 5.9.9 | 5.9.9 |
References
- https://github.com/craftcms/cms/commit/e1a3dd669ae31491b86ad996e88a1d30d33d9a42 · Patch, WEB
- https://github.com/craftcms/cms/security/advisories/GHSA-g7j6-fmwx-7vp8 · Patch, Vendor Advisory, WEB
- https://github.com/craftcms/cms/security/advisories/GHSA-2453-mppf-46cj · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-31858 · ADVISORY
- https://github.com/craftcms/cms · PACKAGE
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 11 Mar 2026)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 11 Mar 2026)