CVE-2026-79752cakephp
SQL Injection in CakePHP FunctionsBuilder
Critical 9.2 No auth needed
Follow: this CVE · cakephp · cakephp We alert you by email or Slack (account required).
- Priority
- 70
- CVSS 4.0
- 9.2
- EPSS
- —
- Auth required
- No
- Published
- Sep 17, 2026
- Updated
- Sep 30, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-89
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
CakePHP versions prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7 contain an SQL injection vulnerability in FunctionsBuilder methods cast, extract, datePart, and dateAdd. An attacker can pass untrusted input to these parameters to execute arbitrary SQL commands, affecting data confidentiality, integrity, and availability based on database connection privileges.
Show the original NVD text
CakePHP is a rapid development framework for PHP. Prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7, FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, and FunctionsBuilder::dateAdd in src/Database/FunctionsBuilder.php accept user-controlled dataType, part, or unit values and incorporate them into generated SQL as unescaped structural fragments. An application that passes untrusted input to these parameters can permit SQL injection with confidentiality, integrity, and availability impact according to the database connection's privileges. This issue is fixed in versions 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7.
What to do
Patch available · fixed versions: 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7
Update CakePHP to version 4.5.12, 4.6.5, 5.1.9, 5.2.14, or 5.3.7 depending on your version branch.
- Apply the vendor's security update for cakephp.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | cakephp/cakephp |
< 4.5.12 |
4.5.12 |
composer require "cakephp/cakephp:^4.5.12" |
| Packagist | cakephp/cakephp |
≥ 4.6.0 < 4.6.5 |
4.6.5 |
composer require "cakephp/cakephp:^4.6.5" |
| Packagist | cakephp/cakephp |
≥ 5.0.0 < 5.1.9 |
5.1.9 |
composer require "cakephp/cakephp:^5.1.9" |
| Packagist | cakephp/cakephp |
≥ 5.2.0 < 5.2.14 |
5.2.14 |
composer require "cakephp/cakephp:^5.2.14" |
| Packagist | cakephp/cakephp |
≥ 5.3.0 < 5.3.7 |
5.3.7 |
composer require "cakephp/cakephp:^5.3.7" |
| Packagist | cakephp/database |
≥ 3.0.0 < 4.5.12 |
4.5.12 |
composer require "cakephp/database:^4.5.12" |
| Packagist | cakephp/database |
≥ 4.6.0 < 4.6.5 |
4.6.5 |
composer require "cakephp/database:^4.6.5" |
| Packagist | cakephp/database |
≥ 5.0.0 < 5.1.9 |
5.1.9 |
composer require "cakephp/database:^5.1.9" |
| Packagist | cakephp/database |
≥ 5.2.0 < 5.2.14 |
5.2.14 |
composer require "cakephp/database:^5.2.14" |
| Packagist | cakephp/database |
≥ 5.3.0 < 5.3.7 |
5.3.7 |
composer require "cakephp/database:^5.3.7" |
Per OSV / GitHub Advisories (GHSA-vjqc-q4mp-2rvf). Check the version in your lockfile before upgrading.
Affected products
- cakephp · cakephp
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.