Vulnerability · Published Jan 17, 2023 · Assigned by GitHub_M

CVE-2023-22727Database Query::offset() and limit() vulnerable to SQL injection in cakephp

Critical 9.8

In plain English

A critical-severity SQL injection in cakephp from cakephp. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 60% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)0.9%top 40.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistcakephp/cakephp4.2.12GHSA-6g8q-qfpv-57wp
Packagistcakephp/cakephp4.3.11GHSA-6g8q-qfpv-57wp
Packagistcakephp/cakephp4.4.10GHSA-6g8q-qfpv-57wp
Packagistcakephp/database4.2.12GHSA-6g8q-qfpv-57wp
Packagistcakephp/database4.3.11GHSA-6g8q-qfpv-57wp
Packagistcakephp/database4.4.10GHSA-6g8q-qfpv-57wp
Ubuntu:22.04:LTScakephpno fix listedUBUNTU-CVE-2023-22727

Affected products (as reported)

VendorProductVersions
cakephp cakephp >= 4.2.0, < 4.2.12>= 4.3.0, < 4.3.11>= 4.4.0, < 4.4.10

Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References