{"id":"CVE-2026-79752","aliases":["CVE-2026-79752","GHSA-vjqc-q4mp-2rvf"],"related":[],"kind":"vulnerability","state":"published","title":"CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection","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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe `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.\n\n### Patches\n5.3.7, 5.2.14, 5.1.9, 4.6.5, 4.5.12 contain fixes \n\n### Workarounds\nDon't provide user controlled data to these functions/parameters.","format":"markdown","source":"ghsa"}],"published":"2026-09-17T14:49:56.936Z","modified":"2026-09-30T17:43:24.057Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":9.2,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"CRITICAL"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 4.5.12","status":"affected"},{"version":">= 4.6.0, < 4.6.5","status":"affected"},{"version":">= 5.0.0, < 5.1.9","status":"affected"},{"version":">= 5.2.0, < 5.2.14","status":"affected"},{"version":">= 5.3.0, < 5.3.7","status":"affected"}],"vendor":"cakephp","product":"cakephp","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","fixed":"4.5.12"}],"ecosystem":"Packagist","package":"cakephp/database","purl":"pkg:composer/cakephp/database","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.6.0","status":"affected","fixed":"4.6.5"}],"ecosystem":"Packagist","package":"cakephp/database","purl":"pkg:composer/cakephp/database","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.1.9"}],"ecosystem":"Packagist","package":"cakephp/database","purl":"pkg:composer/cakephp/database","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.2.0","status":"affected","fixed":"5.2.14"}],"ecosystem":"Packagist","package":"cakephp/database","purl":"pkg:composer/cakephp/database","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.3.0","status":"affected","fixed":"5.3.7"}],"ecosystem":"Packagist","package":"cakephp/database","purl":"pkg:composer/cakephp/database","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.5.12"}],"ecosystem":"Packagist","package":"cakephp/cakephp","purl":"pkg:composer/cakephp/cakephp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.6.0","status":"affected","fixed":"4.6.5"}],"ecosystem":"Packagist","package":"cakephp/cakephp","purl":"pkg:composer/cakephp/cakephp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0","status":"affected","fixed":"5.1.9"}],"ecosystem":"Packagist","package":"cakephp/cakephp","purl":"pkg:composer/cakephp/cakephp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.2.0","status":"affected","fixed":"5.2.14"}],"ecosystem":"Packagist","package":"cakephp/cakephp","purl":"pkg:composer/cakephp/cakephp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"5.3.0","status":"affected","fixed":"5.3.7"}],"ecosystem":"Packagist","package":"cakephp/cakephp","purl":"pkg:composer/cakephp/cakephp","source":"ghsa"}],"references":[{"url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/pull/19520","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/pull/19528","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/releases/tag/4.5.12","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/releases/tag/4.6.5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/releases/tag/5.1.9","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/releases/tag/5.2.14","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cakephp/cakephp/releases/tag/5.3.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-79752","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/cakephp/cakephp/commit/4730e774bd3b9caa90d67af49e27a12033ec3c71","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cakephp/cakephp/releases/tag/5.1.8","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cakephp/cakephp","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-09-17T15:19:49.116Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-79752","url":"https://www.cve.org/CVERecord?id=CVE-2026-79752","licence":"CVE Terms of Use","modified":"2026-09-17T15:20:00.313Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vjqc-q4mp-2rvf","url":"https://github.com/advisories/GHSA-vjqc-q4mp-2rvf","licence":"CC-BY-4.0","modified":"2026-09-24T14:45:07.479Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-79752","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-79752","licence":"Public domain","modified":"2026-09-30T17:43:24.057Z"}],"updatedAt":"2026-11-25T22:59:39.262Z","epss":{"score":0.00665,"percentile":0.53053,"date":"2026-12-01T12:00:22.000Z"}}