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

Published Sep 17, 2026
·
Updated

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.

Affected Software

1 affected component
CakePHP CakePHP<4.5.12, <4.6.5, <5.1.9, <5.2.14, <5.3.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 4.5.12
  2. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 4.6.5
  3. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 5.1.9
  4. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 5.2.14
  5. Upgrade

    Upgrade CakePHP to a version that resolves this vulnerability.

    Fixed in 5.3.7

Event History

Sep 17, 2026
CVE Published
via MITRE·02:49 PM
Data Sourced
via MITRE·02:49 PM
DescriptionWeakness

Frequently Asked Questions

1

Which applications are exposed to exploitation?

Applications are exposed if they use an affected CakePHP version and pass untrusted input into the dataType parameter of FunctionsBuilder::cast, the part parameter of FunctionsBuilder::extract or FunctionsBuilder::datePart, or the unit parameter of FunctionsBuilder::dateAdd.

2

What does an attacker need to exploit this issue?

An attacker needs a way to influence one of the affected parameters through application input. The vulnerable values are inserted into generated SQL as unescaped structural fragments.

3

Are applications using CakePHP defaults automatically vulnerable?

The issue requires application code to pass untrusted input to the affected parameters. The provided information does not indicate that normal default use without untrusted values is exploitable.

4

What is the remediation?

Upgrade to CakePHP 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7, or a later version in the applicable release line. If upgrading cannot happen immediately, prevent untrusted input from reaching the affected dataType, part, and unit parameters.

5

How can teams assess whether they are affected?

Review uses of FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, and FunctionsBuilder::dateAdd, and trace the values supplied to dataType, part, and unit. Treat any value that can be influenced by a request, user-controlled record, or other untrusted source as affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203