# CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection

Critical severity, published 2026-09-17. 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.

Canonical URL: https://buzzphp.com/security/ghsa-vjqc-q4mp-2rvf · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | critical |
| Published | 2026-09-17 |
| Updated | 2026-09-24 |
| CVE | [CVE-2026-79752](https://nvd.nist.gov/vuln/detail/CVE-2026-79752) |
| GHSA | [GHSA-vjqc-q4mp-2rvf](https://github.com/advisories/GHSA-vjqc-q4mp-2rvf) |
| Weakness | CWE-89 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| cakephp/database | >= 4.6.0, < 4.6.5 or >= 5.0.0, < 5.1.9 or >= 5.2.0, < 5.2.14 or >= 5.3.0, < 5.3.7 or >= 3.0.0, < 4.5.12 | 4.6.5, 5.1.9, 5.2.14, 5.3.7, 4.5.12 |
| cakephp/cakephp | < 4.5.12 or >= 4.6.0, < 4.6.5 or >= 5.0.0, < 5.1.9 or >= 5.2.0, < 5.2.14 or >= 5.3.0, < 5.3.7 | 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 |

## What to do

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.

Check which version you run with `composer show cakephp/database`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-vjqc-q4mp-2rvf on GitHub](https://github.com/advisories/GHSA-vjqc-q4mp-2rvf)
- [CVE-2026-79752 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-79752)
- [All Composer security advisories](https://buzzphp.com/security)
