CVE-2026-31858
JSON

8.7high

CraftCMS's `ElementSearchController` Affected by Blind SQL Injection

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.40% (higher than 36% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-g7j6-fmwx-7vp8

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.

Affected

Product or packageVersionsReported by
craftcms cms>= 5.0.0-RC1, <= 5.9.8CVE List
craftcms/cms (Packagist)from 5.0.0-RC1 before 5.9.9GitHub Advisory Database
craftcms craft_cmsfrom 5.0.1 before 5.9.9, 5.0.0NVD

All scores

GitHub_M8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Craft es un sistema de gestión de contenido (CMS). El punto final ElementSearchController::actionSearch() carece de la protección unset() que se añadió a ElementIndexesController en CVE-2026-25495. Exactamente la misma vulnerabilidad de inyección SQL (incluyendo criteria[orderBy], el vector de aviso original) funciona en este controlador porque la solución nunca se le aplicó. Cualquier usuario autenticado del panel de control (no se requiere administrador) puede inyectar SQL arbitrario a través de criteria[where], criteria[orderBy], u otras propiedades de consulta, y extraer el contenido completo de la base de datos a través de inyección ciega basada en booleanos. Los usuarios deben actualizar a la versión 5.9.9 parcheada para mitigar el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31858 changed 2026-03-12CVE Terms of Use
GitHub Advisory DatabaseGHSA-g7j6-fmwx-7vp8 changed 2026-03-13CC-BY-4.0
NVDCVE-2026-31858 changed 2026-06-17Public domain