{"id":"CVE-2023-22727","aliases":["DEBIAN-CVE-2023-22727","EUVD-2023-0361","GHSA-6g8q-qfpv-57wp","UBUNTU-CVE-2023-22727"],"status":"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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00898,"percentile":0.60039,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2023-01-17T20:41:10Z","modified":"2026-11-03T21:17:15Z","fixes":[{"ecosystem":"Packagist","package":"cakephp/cakephp","fixed_in":["4.2.12","4.3.11","4.4.10"],"sources":["ghsa","osv"]},{"ecosystem":"Packagist","package":"cakephp/database","fixed_in":["4.2.12","4.3.11","4.4.10"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"cakephp/cakephp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.0"},{"fixed":"4.2.12"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"cakephp/cakephp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.3.0"},{"fixed":"4.3.11"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"cakephp/cakephp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.0"},{"fixed":"4.4.10"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"cakephp/database","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.2.0"},{"fixed":"4.2.12"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"cakephp/database","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.3.0"},{"fixed":"4.3.11"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"cakephp/database","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.4.0"},{"fixed":"4.4.10"}]}]},{"source":"osv","ecosystem":"Packagist","package":"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"]},{"source":"osv","ecosystem":"Packagist","package":"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"]},{"source":"osv","ecosystem":"Packagist","package":"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"]},{"source":"osv","ecosystem":"Packagist","package":"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"]},{"source":"osv","ecosystem":"Packagist","package":"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"]},{"source":"osv","ecosystem":"Packagist","package":"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"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"cakephp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7.2-1","2.8.0-1","2.8.0-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"cakephp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.10.11-2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"cakephp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.10.11-2.1","2.10.24-1"]}],"products":[{"vendor":"cakephp","product":"cakephp"}],"references":[{"url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22727","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-6g8q-qfpv-57wp"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/22xxx/CVE-2023-22727.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-22727","tags":["advisory"]},{"url":"https://github.com/cakephp/cakephp","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2023-22727","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-22727","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2023-22727","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.","status":"published","published":"2023-01-17T20:41:10.143Z","modified":"2025-03-10T21:22:35.657Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:35:15.779187Z"}],"euvd":[{"id":"EUVD-2023-0361","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.","status":"published","published":"2023-01-17T20:41:10Z","modified":"2025-03-10T21:22:35Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T20:53:08.584552Z"}],"ghsa":[{"id":"GHSA-6g8q-qfpv-57wp","title":"CakePHP Database\\\\Query::offset() and limit() methods are vulnerable to SQL injection","description":"### 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","status":"published","published":"2023-01-20T17:30:20Z","modified":"2023-01-25T17:57:20Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:36:14.825433Z"}],"nvd":[{"id":"CVE-2023-22727","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.","status":"published","published":"2023-01-17T21:15:16.55Z","modified":"2026-06-17T05:36:02.727Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:07:45.305824Z"}],"osv":[{"id":"CVE-2023-22727","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.","status":"published","published":"2023-01-17T20:41:10.143Z","modified":"2026-10-28T02:30:58.064844918Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:44:30.334753Z"},{"id":"DEBIAN-CVE-2023-22727","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.","status":"withdrawn","published":"2023-01-17T21:15:16.55Z","modified":"2026-01-27T13:59:07.297366Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:39.369204Z"},{"id":"GHSA-6g8q-qfpv-57wp","title":"CakePHP Database\\\\Query::offset() and limit() methods are vulnerable to SQL injection","description":"### 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","status":"published","published":"2023-01-20T17:30:20Z","modified":"2026-09-10T03:49:50.877561014Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:39.618611Z"},{"id":"UBUNTU-CVE-2023-22727","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.","status":"published","published":"2023-01-17T21:15:00Z","modified":"2026-11-03T21:17:15.294719909Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T21:44:00.661154Z"}]}}
