CVE-2026-79752: CakePHP SQL Injection Vulnerability
CRITICALCVE-2026-79752 is a CRITICAL sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting CakePHP libraries in the Packagist ecosystem. The issue involves multiple methods in functionsbuilder vulnerable to sql injection. Remediation is available by upgrading affected packages to version 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7.
CVE-2026-79752 at a Glance
How to Fix CVE-2026-79752
To remediate this vulnerability, upgrade all affected CakePHP dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade cakephp/database to 4.5.12
Upgrade cakephp/database to 4.6.5
Upgrade cakephp/database to 5.1.9
Upgrade cakephp/database to 5.2.14
Upgrade cakephp/database to 5.3.7
Upgrade cakephp/cakephp to 4.5.12
Upgrade cakephp/cakephp to 4.6.5
Upgrade cakephp/cakephp to 5.1.9
Upgrade cakephp/cakephp to 5.2.14
Upgrade cakephp/cakephp to 5.3.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for cakephp/database
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-79752, inspect your project dependencies for CakePHP:
inspect dependencies for cakephp/database
Analyze the terminal output to locate any version of CakePHP in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.12), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In CakePHP, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-79752 Affected CakePHP Versions
10 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cakephp/database
|
Packagist |
≥ 3.0.0
< 4.5.12
|
4.5.12
|
|
cakephp/database
|
Packagist |
≥ 4.6.0
< 4.6.5
|
4.6.5
|
|
cakephp/database
|
Packagist |
≥ 5.0.0
< 5.1.9
|
5.1.9
|
|
cakephp/database
|
Packagist |
≥ 5.2.0
< 5.2.14
|
5.2.14
|
|
cakephp/database
|
Packagist |
≥ 5.3.0
< 5.3.7
|
5.3.7
|
|
cakephp/cakephp
|
Packagist |
< 4.5.12
|
4.5.12
|
|
cakephp/cakephp
|
Packagist |
≥ 4.6.0
< 4.6.5
|
4.6.5
|
|
cakephp/cakephp
|
Packagist |
≥ 5.0.0
< 5.1.9
|
5.1.9
|
|
cakephp/cakephp
|
Packagist |
≥ 5.2.0
< 5.2.14
|
5.2.14
|
|
cakephp/cakephp
|
Packagist |
≥ 5.3.0
< 5.3.7
|
5.3.7
|
References
Frequently Asked Questions
What is CVE-2026-79752?
Which CakePHP versions are affected?
What version fixes CVE-2026-79752?
Is cakephp/database affected?
Is cakephp/cakephp affected?
What CWE is associated with CVE-2026-79752?
How can I check Packagist dependencies for CVE-2026-79752?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vjqc-q4mp-2rvf",
"modified" : "2026-09-24T14:36:09Z",
"published" : "2026-09-17T20:28:14Z",
"aliases" : [ "CVE-2026-79752" ],
"summary" : "CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection",
"details" : "### 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "4.5.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.6.0"
}, {
"fixed" : "4.6.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.1.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.2.0"
}, {
"fixed" : "5.2.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.3.0"
}, {
"fixed" : "5.3.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.6.0"
}, {
"fixed" : "4.6.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.1.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.2.0"
}, {
"fixed" : "5.2.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "cakephp/cakephp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.3.0"
}, {
"fixed" : "5.3.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-79752"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/pull/19528"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/pull/19520"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/commit/4730e774bd3b9caa90d67af49e27a12033ec3c71"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/releases/tag/4.5.12"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/releases/tag/4.6.5"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/releases/tag/5.1.8"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/releases/tag/5.1.9"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/releases/tag/5.2.14"
}, {
"type" : "WEB",
"url" : "https://github.com/cakephp/cakephp/releases/tag/5.3.7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cakephp/cakephp"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-17T20:28:14Z",
"nvd_published_at" : "2026-09-17T15:16:51Z"
}
}