Loading...
Skip to main content

CVE-2023-22727 — Vulnerability in cakephp/database — CVE Details

CRITICAL

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

Published January 20, 2023Updated September 10, 2026Source: osv

Summary

### 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

Advisory Timeline

  • First published January 20, 2023 (1361 days ago).
  • Last revised September 10, 2026 — 1328 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update cakephp/database to 4.3.11 or later
composer require "cakephp/database:^4.3.11"
Composer
Update cakephp/cakephp to 4.2.12 or later
composer require "cakephp/cakephp:^4.2.12"
Composer
Update cakephp/cakephp to 4.3.11 or later
composer require "cakephp/cakephp:^4.3.11"
Composer
Update cakephp/database to 4.4.10 or later
composer require "cakephp/database:^4.4.10"
Composer
Update cakephp/cakephp to 4.4.10 or later
composer require "cakephp/cakephp:^4.4.10"
Composer
Update cakephp/database to 4.2.12 or later
composer require "cakephp/database:^4.2.12"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: packagist (2).

PackageEcosystemAffectedFixed In
cakephp/database
packagist
4.3.0, 4.3.1, 4.3.10, 4.3.2 (+7 more)4.3.11
cakephp/cakephp
packagist
4.2.0, 4.2.1, 4.2.10, 4.2.11 (+8 more)4.2.12
cakephp/cakephp
packagist
4.3.0, 4.3.1, 4.3.10, 4.3.2 (+7 more)4.3.11
cakephp/database
packagist
4.4.0, 4.4.1, 4.4.2, 4.4.3 (+6 more)4.4.10
cakephp/cakephp
packagist
4.4.0, 4.4.1, 4.4.2, 4.4.3 (+6 more)4.4.10
cakephp/database
packagist
4.2.0, 4.2.1, 4.2.10, 4.2.11 (+8 more)4.2.12

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2023-22727?
CakePHP Database\\Query::offset() and limit() methods are vulnerable to SQL injection This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2023-22727?
CVE-2023-22727 affects cakephp/database and cakephp/cakephp. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-22727 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-6g8q-qfpv-57wp

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies