CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
Package
Affected versions
< 4.5.12
>= 4.6.0, < 4.6.5
>= 5.0.0, < 5.1.9
>= 5.2.0, < 5.2.14
>= 5.3.0, < 5.3.7
Patched versions
4.5.12
4.6.5
5.1.9
5.2.14
5.3.7
>= 4.6.0, < 4.6.5
>= 5.0.0, < 5.1.9
>= 5.2.0, < 5.2.14
>= 5.3.0, < 5.3.7
>= 3.0.0, < 4.5.12
4.6.5
5.1.9
5.2.14
5.3.7
4.5.12
Description
Published by the National Vulnerability Database
Sep 17, 2026
Published to the GitHub Advisory Database
Sep 17, 2026
Reviewed
Sep 17, 2026
Last updated
Sep 24, 2026
Impact
The
FunctionsBuilder::cast($field, $dataType),extract($part, $expr),datePart($part, $expr),dateAdd($expr, $value, $unit)methods are vulnerable to SQL injection if user controlled data is supplied to the ($dataType / $part / $unit) parameters.Patches
5.3.7, 5.2.14, 5.1.9, 4.6.5, 4.5.12 contain fixes
Workarounds
Don't provide user controlled data to these functions/parameters.
References