{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-22727","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. Man","descriptionLong":"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.","published":"2023-01-17T20:41:10.143Z","updated":"2026-10-28T02:30:58.064844918Z","reserved":"2023-01-06T14:21:05.890Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"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","rating":"critical","source":"GitHub_M"},"metrics":[{"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","rating":"critical","source":"GitHub_M"},{"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","rating":"critical","source":"github.com"},{"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","rating":"critical","source":"NVD"},{"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","rating":"critical","source":"OSV"},{"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","rating":"critical","source":"GitHub"}],"rating":"critical","products":["cakephp"],"affectedProducts":[{"vendor":"cakephp","product":"cakephp","defaultStatus":null,"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"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"cakephp/cakephp","purl":"pkg:composer/cakephp/cakephp","ranges":[">=4.2.0 <4.2.12",">=4.3.0 <4.3.11",">=4.4.0 <4.4.10"],"fixed":["4.2.12","4.3.11","4.4.10"],"advisory":"GHSA-6g8q-qfpv-57wp"},{"ecosystem":"Packagist","name":"cakephp/database","purl":"pkg:composer/cakephp/database","ranges":[">=4.2.0 <4.2.12",">=4.3.0 <4.3.11",">=4.4.0 <4.4.10"],"fixed":["4.2.12","4.3.11","4.4.10"],"advisory":"GHSA-6g8q-qfpv-57wp"}],"cwes":["CWE-89"],"aliases":["GHSA-6g8q-qfpv-57wp"],"references":[{"url":"https://github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"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"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/22xxx/CVE-2023-22727.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22727","tags":["advisory"]},{"url":"https://github.com/cakephp/cakephp","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.00932,"epssPercentile":0.61436,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-22727","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22727","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-22727","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-6g8q-qfpv-57wp","ok":true,"note":"GHSA-6g8q-qfpv-57wp"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-22727","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}