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

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Published: 2026-03-11T00:27:23.000Z
- Modified: 2026-06-17T10:34:38.727Z
- Also known as: GHSA-g7j6-fmwx-7vp8
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- craftcms cms: >= 5.0.0-RC1, <= 5.9.8
- craftcms/cms (Packagist): from 5.0.0-RC1 before 5.9.9
- craftcms craft_cms: from 5.0.1 before 5.9.9; 5.0.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/craftcms/cms/security/advisories/GHSA-g7j6-fmwx-7vp8> (patch, vendor-advisory, web)
- <https://github.com/craftcms/cms/commit/e1a3dd669ae31491b86ad996e88a1d30d33d9a42> (patch, 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)

## Sources

- CVE List: [CVE-2026-31858](https://www.cve.org/CVERecord?id=CVE-2026-31858), CVE Terms of Use, modified 2026-03-12
- GitHub Advisory Database: [GHSA-g7j6-fmwx-7vp8](https://github.com/advisories/GHSA-g7j6-fmwx-7vp8), CC-BY-4.0, modified 2026-03-13
- NVD: [CVE-2026-31858](https://nvd.nist.gov/vuln/detail/CVE-2026-31858), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-31858 · Whole record: https://cve.day/CVE-2026-31858.json · Rebuilt by cve.day 2026-11-25T22:59:15.757Z
