Skip to content
Fencer Vulns
critical 9.8

CVE-2023-22727 json

Database Query::offset() and limit() vulnerable to SQL injection in cakephp

published 2023-01-17 3 y ago modified 2026-09-10 1 mo ago also GHSA-6g8q-qfpv-57wp , EUVD-2023-0361

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.9%
EPSS 0.9% chance of exploitation in 30 days, percentile 59%
public exploits
0
none known

Summary

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.

Patch / fix

  • packagist cakephp/cakephp 4.2.12, 4.3.11, 4.4.10
  • packagist cakephp/database 4.2.12, 4.3.11, 4.4.10
  • cakephp cakephp 4.2.12, 4.3.11, 4.4.10

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
19 mo ago

Exploit prediction

0.90% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
packagist cakephp/cakephp
>=4.2.0, <4.2.12
>=4.3.0, <4.3.11
>=4.4.0, <4.4.10
4.2.12
4.3.11
4.4.10
packagist cakephp/database
>=4.2.0, <4.2.12
>=4.3.0, <4.3.11
>=4.4.0, <4.4.10
4.2.12
4.3.11
4.4.10

Affected products

  • cakephp cakephp

Classification

Weakness
  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.