Critical

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

  • Disclosed: 20.01.2023
  • Updated: 11.10.2026 10:22

Impact

The Cake\Database\Query::limit() and Cake\Database\Query::offset() methods are vulnerable to SQL injection if passed un-sanitized user request data.

Patches

This issue has been fixed in 4.2.12, 4.3.11, 4.4.10

Workarounds

Using CakePHP's Pagination library will mitigate this issue, as will validating or casting parameters to these methods.

References

https://bakery.cakephp.org/2023/01/06/cakephp_4211_4311_4410_released.html

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Composer package 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
Composer package 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

References

CVSS score 9.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-89
Platform
Composer
Package
cakephp/cakephp, cakephp/database
Disclosed
20.01.2023
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-6g8q-qfpv-57wp - CC BY 4.0

Vulnerability history: cakephp/cakephp

All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (22) in the archive
Total entries
22
First → latest
12.2019 09.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 3
  • High 8
  • Medium 11

Disclosures per year

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 9
  5. 2023: 7
  6. 2024: 0
  7. 2025: 0
  8. 2026: 5
Severity:
  1. Critical CVE-2026-79752 < 4.5.12, >= 4.6.0, < 4.6.5, >= 5.0.0, < 5.1.9, >= 5.2.0, < 5.2.14, >= 5.3.0, < 5.3.7 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7
  2. Critical CVE-2026-77635 >= 5.3.0, < 5.3.7, >= 5.2.0, < 5.2.15, >= 5.1.0, < 5.1.10 5.3.7, 5.2.15, 5.1.10
  3. High CVE-2026-77634 >= 4.5.0, < 4.5.12, >= 4.6.0, < 4.6.5, >= 5.0.0, < 5.1.9, >= 5.2.0, < 5.2.14, >= 5.3.0, < 5.3.7 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7
  4. High ghsa-q79m-c546-2g63 >= 3.0.0, < 3.0.6, >= 2.0.0, < 2.0.99, >= 2.1.0, < 2.1.99, >= 2.2.0, < 2.2.99, >= 2.3.0, < 2.3.99, >= 2.4.0, < 2.4.99, >= 2.5.0, < 2.5.90, >= 2.6.0, < 2.6.6 3.0.6, 2.0.99, 2.1.99, 2.2.99, 2.3.99, 2.4.99, 2.5.90, 2.6.6
  5. CakePHP Database\\Query::offset() and limit() methods are vulnerable to SQL injection this entry
    Critical · 9.8 CVE-2023-22727 >= 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
  6. High · 8.8 CVE-2020-35239 >= 4.0.0, < 4.0.10, >= 4.1.0, < 4.1.4 4.0.10, 4.1.4
  7. High · 7.5 CVE-2012-4399 >= 2.1.0-alpha, < 2.1.5, >= 2.2.0-beta, < 2.2.1 2.1.5, 2.2.1
  8. High · 7.5 CVE-2016-4793 >= 1.2.0, < 2.6.13, >= 2.7.0-rc1, < 2.7.11, >= 2.8.0-rc1, < 2.8.2, >= 3.0.0-rc1, < 3.0.17, >= 3.1.0-beta1, < 3.1.12, >= 3.2.0-rc1, < 3.2.5 2.6.13, 2.7.11, 2.8.2, 3.0.17, 3.1.12, 3.2.5
  9. High · 7.5 CVE-2019-11458 >= 3.0.0, < 3.5.18, >= 3.6.0, < 3.6.15, >= 3.7.0, < 3.7.7 3.5.18, 3.6.15, 3.7.7

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.