CVE-2023-22727
CWE-89Published: January 17, 2023· Updated: Jun 17, 2026
Official 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.
Risk Analysis
The CakePHP framework is vulnerable to SQL injection when un-sanitized user data is passed to specific database query methods. This critical flaw allows attackers to compromise the database layer.
No public exploit is known, and it is not in the KEV catalog. It is remotely exploitable.
Upgrade to CakePHP versions 4.2.12, 4.3.11, or 4.4.10. Alternatively, use the Pagination library or manually validate and cast parameters.
Technical Analysis
CVE-2023-22727 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 9.8.
From a weakness classification perspective (CWE-89): SQL injection vulnerabilities allow attackers to manipulate database queries, potentially exposing or modifying sensitive data.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (6)
Quick Facts
Related CVEs (CWE-89)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2023-22727 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts