ADVISORIES

GitHub Advisory Database

GHSA-vjqc-q4mp-2rvf

CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection

Critical CVE-2026-79752

Details

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.

Affected packages

EcosystemPackageAffected versions
Packagistcakephp/database
From 3.0.0 before 4.5.12 (fixed in 4.5.12)
Packagistcakephp/database
From 4.6.0 before 4.6.5 (fixed in 4.6.5)
Packagistcakephp/database
From 5.0.0 before 5.1.9 (fixed in 5.1.9)
Packagistcakephp/database
From 5.2.0 before 5.2.14 (fixed in 5.2.14)
Packagistcakephp/database
From 5.3.0 before 5.3.7 (fixed in 5.3.7)
Packagistcakephp/cakephp
All versions before 4.5.12 (fixed in 4.5.12)
Packagistcakephp/cakephp
From 4.6.0 before 4.6.5 (fixed in 4.6.5)
Packagistcakephp/cakephp
From 5.0.0 before 5.1.9 (fixed in 5.1.9)
Packagistcakephp/cakephp
From 5.2.0 before 5.2.14 (fixed in 5.2.14)
Packagistcakephp/cakephp
From 5.3.0 before 5.3.7 (fixed in 5.3.7)

References