CVE-2023-22727Cakephp
Critical 9.8 No auth needed
Follow: this CVE · Cakephp · Cakephp We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 1.0% probability of exploitation in 30 days · percentile 63
- Auth required
- No
- Published
- Jan 17, 2023
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-89
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Cakephp.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | cakephp/cakephp |
≥ 4.2.0 < 4.2.12 |
4.2.12 |
composer require "cakephp/cakephp:^4.2.12" |
| Packagist | cakephp/cakephp |
≥ 4.3.0 < 4.3.11 |
4.3.11 |
composer require "cakephp/cakephp:^4.3.11" |
| Packagist | cakephp/cakephp |
≥ 4.4.0 < 4.4.10 |
4.4.10 |
composer require "cakephp/cakephp:^4.4.10" |
| Packagist | cakephp/database |
≥ 4.2.0 < 4.2.12 |
4.2.12 |
composer require "cakephp/database:^4.2.12" |
| Packagist | cakephp/database |
≥ 4.3.0 < 4.3.11 |
4.3.11 |
composer require "cakephp/database:^4.3.11" |
| Packagist | cakephp/database |
≥ 4.4.0 < 4.4.10 |
4.4.10 |
composer require "cakephp/database:^4.4.10" |
Per OSV / GitHub Advisories (GHSA-6g8q-qfpv-57wp). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| cakephp | cakephp | ≥ 4.2.0 < 4.2.12 |
| cakephp | cakephp | ≥ 4.3.0 < 4.3.11 |
| cakephp | cakephp | ≥ 4.4.0 < 4.4.10 |
Official sources
References
Links published by the sources. Open them with care.
- bakery.cakephp.org Release Notes Vendor Advisory
- github.com Patch Third Party Advisory
- github.com Third Party Advisory