CVE-2023-22727: CakePHP Database\\Query::offset() and limit() methods are vulnerable to SQL injection

critical Affects cakephp/cakephp, cakephp/database. Feed 2026.10.29.4, updated 2026-10-29; published ; advisory modified .

CakePHP Database\\Query::offset() and limit() methods are vulnerable to SQL injection

Package
cakephp/cakephp Composer
Affected versions
>=4.2.0 and <4.2.12 or >=4.3.0 and <4.3.11 or >=4.4.0 and <4.4.10
Fixed in
4.2.12, 4.3.11, 4.4.10
Severity
critical  CVSS 9.8
Exploitation
not on CISA KEV · EPSS 1% (59.5th percentile)
Published
2023-01-20
Source
osv.dev

References

CakePHP Database\\Query::offset() and limit() methods are vulnerable to SQL injection

Package
cakephp/database Composer
Affected versions
>=4.2.0 and <4.2.12 or >=4.3.0 and <4.3.11 or >=4.4.0 and <4.4.10
Fixed in
4.2.12, 4.3.11, 4.4.10
Severity
critical  CVSS 9.8
Exploitation
not on CISA KEV · EPSS 1% (59.5th percentile)
Published
2023-01-20
Source
osv.dev

References

CWE-89
NVD recordcakephp/cakephp advisoriescakephp/database advisories

Am I affected?

Find out in one command. phpwarden checks your composer.lock against this advisory and 20,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.

# PHP projects (recommended)
composer require --dev phpwarden/phpwarden
# then
vendor/bin/phpwarden deps composer.lock

# or, without Composer
pipx install phpwarden   &&   phpwarden deps composer.lock

Or keep it checked automatically: GitHub Action · pre-commit hook · GitLab CI · Laravel artisan command

Install docs   How findings are ranked

Related advisories