CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| cakephp | cakephp | 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 | 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 | Patch available | CNA |
| — | cakephp/database (Packagist) | 3.0.0 to before 4.5.12 | 4.5.12 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/database (Packagist) | 4.6.0 to before 4.6.5 | 4.6.5 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/database (Packagist) | 5.0.0 to before 5.1.9 | 5.1.9 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/database (Packagist) | 5.2.0 to before 5.2.14 | 5.2.14 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/database (Packagist) | 5.3.0 to before 5.3.7 | 5.3.7 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/cakephp (Packagist) | before 4.5.12 | 4.5.12 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/cakephp (Packagist) | 4.6.0 to before 4.6.5 | 4.6.5 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/cakephp (Packagist) | 5.0.0 to before 5.1.9 | 5.1.9 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/cakephp (Packagist) | 5.2.0 to before 5.2.14 | 5.2.14 | Patch available | GHSA-vjqc-q4mp-2rvf |
| — | cakephp/cakephp (Packagist) | 5.3.0 to before 5.3.7 | 5.3.7 | Patch available | GHSA-vjqc-q4mp-2rvf |
- cakephp Vendorcakephp Affected 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.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 Patch available CNA
- cakephp/database (Packagist) Vendor— Affected 3.0.0 to before 4.5.12 Fixed in 4.5.12 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/database (Packagist) Vendor— Affected 4.6.0 to before 4.6.5 Fixed in 4.6.5 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/database (Packagist) Vendor— Affected 5.0.0 to before 5.1.9 Fixed in 5.1.9 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/database (Packagist) Vendor— Affected 5.2.0 to before 5.2.14 Fixed in 5.2.14 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/database (Packagist) Vendor— Affected 5.3.0 to before 5.3.7 Fixed in 5.3.7 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/cakephp (Packagist) Vendor— Affected before 4.5.12 Fixed in 4.5.12 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/cakephp (Packagist) Vendor— Affected 4.6.0 to before 4.6.5 Fixed in 4.6.5 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/cakephp (Packagist) Vendor— Affected 5.0.0 to before 5.1.9 Fixed in 5.1.9 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/cakephp (Packagist) Vendor— Affected 5.2.0 to before 5.2.14 Fixed in 5.2.14 Patch available GHSA-vjqc-q4mp-2rvf
- cakephp/cakephp (Packagist) Vendor— Affected 5.3.0 to before 5.3.7 Fixed in 5.3.7 Patch available GHSA-vjqc-q4mp-2rvf
Remediation
- Fix · CNA cakephp (cakephp) Fixed in 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/database (Packagist) Fixed in 4.5.12 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/database (Packagist) Fixed in 4.6.5 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/database (Packagist) Fixed in 5.1.9 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/database (Packagist) Fixed in 5.2.14 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/database (Packagist) Fixed in 5.3.7 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/cakephp (Packagist) Fixed in 4.5.12 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/cakephp (Packagist) Fixed in 4.6.5 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/cakephp (Packagist) Fixed in 5.1.9 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/cakephp (Packagist) Fixed in 5.2.14 Advisory →
- Fix · GHSA-vjqc-q4mp-2rvf cakephp/cakephp (Packagist) Fixed in 5.3.7 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-79752
- 2026-10-03 Alias added: GHSA-vjqc-q4mp-2rvf
- 2026-11-07 EPSS moved to the 50th–90th percentile
References
Other 16
- https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf
- https://github.com/cakephp/cakephp/pull/19520
- https://github.com/cakephp/cakephp/pull/19528
- https://github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0
- https://github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e
- https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676
- https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d
- https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45
- https://github.com/cakephp/cakephp/releases/tag/4.5.12
- https://github.com/cakephp/cakephp/releases/tag/4.6.5
- https://github.com/cakephp/cakephp/releases/tag/5.1.9
- https://github.com/cakephp/cakephp/releases/tag/5.2.14
- https://github.com/cakephp/cakephp/releases/tag/5.3.7
- https://github.com/cakephp/cakephp/commit/4730e774bd3b9caa90d67af49e27a12033ec3c71
- https://github.com/cakephp/cakephp/releases/tag/5.1.8
- https://github.com/cakephp/cakephp
More cakephp vulnerabilities
- TI-2010-04068 The _validatePost function in libs/controller/components/security.php in CakePHP 1.3.x… CVSS 2.0HIGH 7.5
- TI-2026-82995 Cookie leakage in CakePHP HTTP client cookie domain matching CVSS 4.0MEDIUM 6.3
- TI-2026-19037 CakePHP PaginatorHelper::limitControl() vulnerable to reflected cross-site-scripting CVSS 3.1MEDIUM 5.4
- TI-2023-08901 Database Query::offset() and limit() vulnerable to SQL injection in cakephp CVSS 3.1CRITICAL 9.8
- TI-2026-54106 CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver CVSS 4.0CRITICAL 9.2
- TI-2026-82998 SQL injection in CakePHP via unvalidated collation names CVSS 4.0CRITICAL 9.2
Sources
- CVE-2026-79752 · CVE Program
- CVE-2026-79752 · NVD
- FIRST EPSS
- GHSA-vjqc-q4mp-2rvf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences