Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. cakephp/database
  4. ›
  5. CVE-2023-22727

CVE-2023-22727: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

January 20, 2023 (updated January 25, 2023)

CakePHP is a development framework for PHP web apps. In affected versions the Cake\Database\Query::limit() and Cake\Database\Query::offset() methods is 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.

References

  • bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html
  • github.com/advisories/GHSA-6g8q-qfpv-57wp
  • github.com/cakephp/cakephp/commit/3f463e7084b5a15e67205ced3a622577cca7a239
  • github.com/cakephp/cakephp/security/advisories/GHSA-6g8q-qfpv-57wp
  • nvd.nist.gov/vuln/detail/CVE-2023-22727

Code Behaviors & Features

Detect and mitigate CVE-2023-22727 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.2.0 before 4.2.12, all versions starting from 4.3.0 before 4.3.11, all versions starting from 4.4.0 before 4.4.10

Fixed versions

  • 4.2.12
  • 4.3.11
  • 4.4.10

Solution

Upgrade to versions 4.2.12, 4.3.11, 4.4.10 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

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

Source file

packagist/cakephp/database/CVE-2023-22727.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:19 +0000.