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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| cakephp | cakephp | >= 4.2.0, < 4.2.12, >= 4.3.0, < 4.3.11, >= 4.4.0, < 4.4.10 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | cakephp | No fix yet | — |
| Ubuntu 20.04 LTS | cakephp | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | cakephp | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | cakephp/cakephp | >= 4.2.0, < 4.2.12 | 4.2.12 | GHSA-6g8q-qfpv-57wp |
| Packagist | cakephp/cakephp | >= 4.3.0, < 4.3.11 | 4.3.11 | GHSA-6g8q-qfpv-57wp |
| Packagist | cakephp/cakephp | >= 4.4.0, < 4.4.10 | 4.4.10 | GHSA-6g8q-qfpv-57wp |
| Packagist | cakephp/database | >= 4.2.0, < 4.2.12 | 4.2.12 | GHSA-6g8q-qfpv-57wp |
| Packagist | cakephp/database | >= 4.3.0, < 4.3.11 | 4.3.11 | GHSA-6g8q-qfpv-57wp |
| Packagist | cakephp/database | >= 4.4.0, < 4.4.10 | 4.4.10 | GHSA-6g8q-qfpv-57wp |