{"id":"CVE-2023-22727","state":"PUBLISHED","title":"Database Query::offset() and limit() vulnerable to SQL injection in cakephp","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.","publishedAt":"2023-01-17T20:41:10.143Z","updatedAt":"2025-03-10T21:22:35.657Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["cakephp cakephp"],"affected":[{"vendor":"cakephp","product":"cakephp","versions":[{"version":">= 4.2.0, < 4.2.12","status":"affected"},{"version":">= 4.3.0, < 4.3.11","status":"affected"},{"version":">= 4.4.0, < 4.4.10","status":"affected"}]}],"references":["https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html"],"weaknesses":["CWE-89"],"ingestedAt":"2026-10-29T20:05:43.909Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/22xxx/CVE-2023-22727.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2023-22727","state":"PUBLISHED","datePublished":"2023-01-17T20:41:10.143Z","dateUpdated":"2025-03-10T21:22:35.657Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2023-01-06T14:21:05.890Z"},"containers":{"cna":{"title":"Database Query::offset() and limit() vulnerable to SQL injection in cakephp","descriptions":[{"lang":"en","value":"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":[{"vendor":"cakephp","product":"cakephp","versions":[{"version":">= 4.2.0, < 4.2.12","status":"affected"},{"version":">= 4.3.0, < 4.3.11","status":"affected"},{"version":">= 4.4.0, < 4.4.10","status":"affected"}]}],"references":[{"url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","name":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","name":"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","name":"https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-89","lang":"en","description":"CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2023-01-17T20:41:10.143Z"},"source":{"advisory":"GHSA-6g8q-qfpv-57wp","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","name":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","name":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html","name":"https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T10:13:50.233Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-03-10T20:59:15.575626Z","id":"CVE-2023-22727","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-03-10T21:22:35.657Z"}}]}}}