{"id":"GHSA-6g8q-qfpv-57wp","summary":"CakePHP Database\\\\Query::offset() and limit() methods are vulnerable to SQL injection","details":"### Impact\n\nThe `Cake\\Database\\Query::limit()` and `Cake\\Database\\Query::offset()` methods are vulnerable to SQL injection if passed un-sanitized user request data.\n\n### Patches\nThis issue has been fixed in 4.2.12, 4.3.11, 4.4.10\n\n### Workarounds\n\nUsing CakePHP's Pagination library will mitigate this issue, as will validating or casting parameters to these methods.\n\n### References\n\nhttps://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html\n","aliases":["CVE-2023-22727"],"modified":"2026-09-10T03:49:50.877561014Z","published":"2023-01-20T17:30:20Z","database_specific":{"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2023-01-20T17:30:20Z","nvd_published_at":"2023-01-17T21:15:00Z","cwe_ids":["CWE-89"]},"references":[{"type":"WEB","url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22727"},{"type":"WEB","url":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239"},{"type":"WEB","url":"https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html"},{"type":"PACKAGE","url":"https://github.com/cakephp/cakephp"}],"affected":[{"package":{"name":"cakephp/cakephp","ecosystem":"Packagist","purl":"pkg:composer/cakephp/cakephp"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.0"},{"fixed":"4.2.12"}]}],"versions":["4.2.0","4.2.1","4.2.10","4.2.11","4.2.2","4.2.3","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.2.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-6g8q-qfpv-57wp/GHSA-6g8q-qfpv-57wp.json"}},{"package":{"name":"cakephp/cakephp","ecosystem":"Packagist","purl":"pkg:composer/cakephp/cakephp"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.3.0"},{"fixed":"4.3.11"}]}],"versions":["4.3.0","4.3.1","4.3.10","4.3.2","4.3.3","4.3.4","4.3.5","4.3.6","4.3.7","4.3.8","4.3.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-6g8q-qfpv-57wp/GHSA-6g8q-qfpv-57wp.json"}},{"package":{"name":"cakephp/cakephp","ecosystem":"Packagist","purl":"pkg:composer/cakephp/cakephp"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.0"},{"fixed":"4.4.10"}]}],"versions":["4.4.0","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.4.6","4.4.7","4.4.8","4.4.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-6g8q-qfpv-57wp/GHSA-6g8q-qfpv-57wp.json"}},{"package":{"name":"cakephp/database","ecosystem":"Packagist","purl":"pkg:composer/cakephp/database"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.0"},{"fixed":"4.2.12"}]}],"versions":["4.2.0","4.2.1","4.2.10","4.2.11","4.2.2","4.2.3","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.2.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-6g8q-qfpv-57wp/GHSA-6g8q-qfpv-57wp.json"}},{"package":{"name":"cakephp/database","ecosystem":"Packagist","purl":"pkg:composer/cakephp/database"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.3.0"},{"fixed":"4.3.11"}]}],"versions":["4.3.0","4.3.1","4.3.10","4.3.2","4.3.3","4.3.4","4.3.5","4.3.6","4.3.7","4.3.8","4.3.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-6g8q-qfpv-57wp/GHSA-6g8q-qfpv-57wp.json"}},{"package":{"name":"cakephp/database","ecosystem":"Packagist","purl":"pkg:composer/cakephp/database"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.0"},{"fixed":"4.4.10"}]}],"versions":["4.4.0","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.4.6","4.4.7","4.4.8","4.4.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-6g8q-qfpv-57wp/GHSA-6g8q-qfpv-57wp.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}