SQL injection leading to privilege escalation


Report #HCKRT-Y64NY8 in Craft CMS Vulnerability Disclosure Program

Disclosed Report
StatusClosed
Resolved
TargetTier 1
craftcms/cms
Severity
High
Details
Program
Craft CMS Vulnerability Disclosure Program
Target
craftcms/cms
Creation Date
9/10/2026 3:36:30 AM
Severity
High
CVSS Score

None

CVE Number
None
Affected versions
>= 4.0.0, < 4.18.9 and >= 5.0.0, < 5.11.2
Visibility
Disclosed
Disclosed at
10/23/2026 9:26:22 PM
Author
@b1ue0cean
Status
Resolved (Closed)
Vulnerability Type (CAPEC™)
SQL Injection
Weakness (CWE)
(CWE-89) Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Summary

An unauthenticated SQL injection in the element search endpoint allows execution of a stacked query, enabling escalation to administrator privileges.

Description

A maliciously crafted search string that flows through the code path:

Search::normalizeSearchQuery() SearchQuery::_parse() Search::_sqlWhere()

Can result in a SQL injection attack.

Impact
  • SQL injection — The attribute parameter is concatenated into the query unsanitized, and because PDO runs with emulated prepares, stacked statements execute. This gives unauthenticated read and write access to the application database.
  • Privilege escalation to administrator — The write primitive was used to set the admin flag on user ID 1 in the users table, confirmed by reading the value back. Craft short-circuits its permission checks on this single column, so no further changes were needed. The same primitive can overwrite any account’s password hash.
Timeline

Reporter

Created.

Thursday, September 10, 2026 3:36 AM
Tyrell

Severity changed from Critical to High

Friday, September 11, 2026 6:45 AM
Tyrell

Changed to Accepted (Open)

Friday, September 11, 2026 7:19 AM
brandonkelly

Github Security Advisory has been created. GHSA-qcvp-ggx3-97r6

Tuesday, September 15, 2026 7:11 PM
angrybrad

Changed to Resolved (Closed).

https://github.com/craftcms/cms/security/advisories/GHSA-qcvp-ggx3-97r6 has been created for this and will be made public on October 19th. Thanks for the report!

Thursday, September 17, 2026 9:06 PM
Hackrate

Our platform helps companies to identify software vulnerabilities in a cost-efficient way. It provides a secure and centralized view of ethical hacking projects for your company.

US Patent Applied for HackGATE #63/645,845

Hackrate Status

Hackrate Ethical Hacking Platform |
2026 ©

CVE Program Numbering Authority