Skip to content
Laskyr

cakephp/cakephp security advisory

CVE-2026-79752: CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection

CVE-2026-79752 is a critical-severity SQL injection vulnerability in the PHP package cakephp/cakephp (CVSS 9.2), published 17 September 2026. It is fixed in 4.5.12, 4.6.5, 5.1.9, 5.2.14 and 5.3.7, one per release line; earlier versions on each line are affected. It can be exploited without an account.

critical 9.2 published 2026-09-17 · updated 2026-09-30

Fixed in cakephp/cakephp 4.5.12, 4.6.5, 5.1.9, 5.2.14 and 5.3.7

This SQL injection issue affects cakephp/cakephp in 5 release lines: < 4.5.12; >= 4.6.0, < 4.6.5; >= 5.0.0, < 5.1.9; >= 5.2.0, < 5.2.14; >= 5.3.0, < 5.3.7. Upgrade to the fixed version for your release line (4.5.12, 4.6.5, 5.1.9, 5.2.14 and 5.3.7). The newest release, 5.4.4, is not affected.

Affected versions
< 4.5.12
>= 4.6.0, < 4.6.5
>= 5.0.0, < 5.1.9
>= 5.2.0, < 5.2.14
>= 5.3.0, < 5.3.7
Fixed in
4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7
Newest release
5.4.4
Severity
Critical · CVSS 9.2
Type
SQL injection
CWE-89
Exploited in the wild
Not on the CISA KEV list
checked 2026-11-04

Is your cakephp/cakephp version affected?

Run composer show cakephp/cakephp in your project, then enter the version. We check it against this and every other known cakephp/cakephp advisory.

Who can exploit CVE-2026-79752

CVSS vector (scored by GitHub): 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

Your app is only exposed if it uses the affected part of cakephp/cakephp. The advisory below says which part that is. If you are not sure, upgrade anyway: it costs less than finding out.

How to fix CVE-2026-79752 in cakephp/cakephp

  1. Find the installed version: composer show cakephp/cakephp. If you never required it yourself, composer why cakephp/cakephp shows which package pulls it in.
  2. Update it: composer update cakephp/cakephp --with-all-dependencies. You need the fixed version for your release line (4.5.12, 4.6.5, 5.1.9, 5.2.14 and 5.3.7).
  3. If Composer will not go that high, your composer.json constraint is holding it back. Widen it (for example "cakephp/cakephp": "^5.3.7" if you can take that version), or upgrade the package that requires it.
  4. Run composer audit. It reads the same advisory data and should no longer list CVE-2026-79752.
  5. Commit composer.lock and deploy it. On the server, run composer install --no-dev from the lock file, not composer update.

If you cannot upgrade yet

General hardening for SQL injection issues while the upgrade waits. None of it replaces the fix.

The CVE-2026-79752 advisory

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.

Description from the CVE record, published by GitHub (the CVE Numbering Authority), via the NVD entry for CVE-2026-79752. Advisory title: “CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection”.

References

Other cakephp/cakephp advisories

Related

Need help patching or upgrading? Laskyr does PHP and Laravel security fixes and upgrades. Tell us what you run and we reply with a plan and a price.

Ask about a fix

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit