CVE-2023-22727

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

State
Published
Severity
9.8 Critical
Published
Jan 17, 2023
Updated
Mar 10, 2025
Reserved
Jan 6, 2023

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HGitHub_M

Weaknesses

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Affected Products

ProductVersions
cakephpcakephp
  • >= 4.2.0, < 4.2.12Affected
  • >= 4.3.0, < 4.3.11Affected
  • >= 4.4.0, < 4.4.10Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.