CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
Critical severity. Published 17 September 2026. Update cakephp/database to the fixed version of your branch (4.6.5, 5.1.9, 5.2.14, 5.3.7, 4.5.12) and cakephp/cakephp to the fixed version of your branch (4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7): composer update cakephp/database cakephp/cakephp.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| cakephp/database (opens in a new tab) | >= 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 |
| cakephp/cakephp (opens in a new tab) | < 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 | 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show cakephp/database
composer auditAdvisory details
| Severity | Critical |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-79752 (opens in a new tab) |
| GHSA | GHSA-vjqc-q4mp-2rvf (opens in a new tab) |
| Weakness | CWE-89 |
What the advisory says
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.
Source: GHSA-vjqc-q4mp-2rvf (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver (critical, 8 September 2026)
- CakePHP: SmtpTransport vulnerable to CRLF header injection (high, 8 September 2026)