GitHub Advisoryadvisory · Packagist

GHSA-g7j6-fmwx-7vp8 CraftCMS's `ElementSearchController` Affected by Blind SQL Injection

HIGH Published 2026-03-11 Modified 2026-03-11 Official page ↗
Aliases
CVE-2026-31858
Ecosystem
Packagist
Packages
craftcms/cms
Severity
High
CVSS vector
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
Weaknesses
CWE-89
Reviewed
2026-03-11

Affected packages

• Packagist craftcms/cms: >= 5.0.0-RC1, < 5.9.9 → fixed in 5.9.9

Description

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.

Related

Alias · CVE (1)

  • CVE-2026-31858 Craft is a content management system (CMS). vulnerability

Weakness · CWE (1)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References