CVE-2023-22727 Details
Description
CakePHP is a development framework for PHP web apps. In affected versions the `Cake\Database\Query::limit()` and `Cake\Database\Query::offset()` methods are vulnerable to SQL injection if passed un-sanitized user request data. This issue has been fixed in 4.2.12, 4.3.11, 4.4.10. Users are advised to upgrade. Users unable to upgrade may mitigate this issue by using CakePHP's Pagination library. Manually validating or casting parameters to these methods will also mitigate the issue.
A SQL injection vulnerability has been identified in the CakePHP framework, specifically in the Query class's limit() and offset() methods. This issue affects versions 4.2.0 prior to 4.2.12, 4.3.0 prior to 4.3.11, and 4.4.0 prior to 4.4.10. The vulnerability arises when these methods are supplied with un-sanitized user input, allowing for the injection of malicious SQL. Applications that do not utilize CakePHP's Pagination library and directly pass request data to these methods are at risk.
Upgrade to CakePHP versions 4.2.12, 4.3.11, or 4.4.10. If an upgrade is not possible, use CakePHP's Pagination library to manage limits and offsets, or manually validate or cast parameters before passing them to the limit() or offset() methods.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 10, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html | CVE | Release NotesVendor Advisory |
| https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239 | CVE | PatchThird Party Advisory |
| https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp | CVE | Third Party Advisory |
| https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html | [email protected] | Release NotesVendor Advisory |
| https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239 | [email protected] | PatchThird Party Advisory |
| https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| cakephp cakephp | >= 4.2.0, < 4.2.12 >= 4.3.0, < 4.3.11 >= 4.4.0, < 4.4.10 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Jan 25, 2023 | Initial Analysis | [email protected] |