{"id":"CVE-2023-22727","published":"2023-01-17T20:41:10Z","modified":"2025-03-10T21:22:35Z","title":"Database Query::offset() and limit() vulnerable to SQL injection in cakephp","vendor":"cakephp","product":"cakephp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01042,"percentile":0.63316,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","tags":["x_refsource_MISC"]},{"url":"https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html","tags":["x_refsource_MISC"]}],"priority":{"score":19.5,"factors":[{"name":"EPSS percentile","points":12.66},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"cakephp","affectedVersions":[{"vendor":"cakephp","product":"cakephp","versions":[">= 4.2.0, < 4.2.12",">= 4.3.0, < 4.3.11",">= 4.4.0, < 4.4.10"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2025-03-10T20:59:15.575626Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"cakephp/cakephp","vulnerableRanges":[">=4.2.0, <4.2.12",">=4.3.0, <4.3.11",">=4.4.0, <4.4.10"],"patched":["4.2.12","4.3.11","4.4.10"],"from":["GHSA-6g8q-qfpv-57wp"],"provenance":"source"},{"ecosystem":"Packagist","package":"cakephp/database","vulnerableRanges":[">=4.2.0, <4.2.12",">=4.3.0, <4.3.11",">=4.4.0, <4.4.10"],"patched":["4.2.12","4.3.11","4.4.10"],"from":["GHSA-6g8q-qfpv-57wp"],"provenance":"source"}],"summary":{"text":"The Database Query limit() and offset() methods in CakePHP's Cake\\Database\\Query component are vulnerable to SQL injection when they are passed unsanitized user request data. An attacker who can supply request parameters that reach these methods can inject SQL through them, and the flaw is reachable over the network without authentication or user interaction, provided the application passes unvalidated request input to these methods.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:17:13Z"},"euvd":{"id":"EUVD-2023-0361","exploited":false,"provenance":"source"}}