Intel

AIKIDO-2026-10047

craftcms/cms is vulnerable to SQL Injection

SQL InjectionGHSA-2453-mppf-46cj

75

High Risk

This Affects:

PHPcraftcms/cms
1.0.0 - 4.16.17
Fixed in 4.16.18
5.0.0 - 5.8.21
Fixed in 5.8.22

TL;DR

Affected versions of this package are vulnerable to SQL injection because user-controlled query criteria could be passed into the internal query builder without sufficient validation, allowing untrusted input to influence the structure of generated SQL queries. In Craft CMS, this meant that parameters such as filtering or ordering options could be merged into SQL fragments rather than being strictly constrained or safely parameterized, enabling an attacker to inject crafted SQL and alter query behavior. The referenced commit fixes this by disallowing unsafe criteria and ensuring only explicitly permitted parameters are used when building database queries, preventing SQL manipulation.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

craftcms/cms is vulnerable to SQL Injection in versions 1.0.0 - 4.16.17 and 5.0.0 - 5.8.21.

How to fix this

Upgrade the craftcms/cms library to the patch version.