CriticalGHSA-vjqc-q4mp-2rvf::1
CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
Affected versions
before 4.5.12, 4.6.0 to before 4.6.5, 5.0.0 to before 5.1.9, 5.2.0 to before 5.2.14, 5.3.0 to before 5.3.7 - fixed in 4.5.12Details
### 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
- https://nvd.nist.gov/vuln/detail/CVE-2026-79752
- https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf
- https://nvd.nist.gov/vuln/detail/CVE-2026-79752
- https://github.com/cakephp/cakephp/pull/19528
- https://github.com/cakephp/cakephp/pull/19520
- https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676
- https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d
- https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45
Is your site exposed?Run a free passive scan. See your platform, versions and the issues on your surface in under a minute.
Check if my site is affected