Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Postgres-backed CakePHP endpoint using jsonValue
-
DeliverySubmit crafted jsonPath in request
-
ExploitBreak out of ::jsonpath expression
-
ExecutionInject arbitrary SQL
-
ImpactExfiltrate or modify database data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Two concrete conditions are required: (1) the application must use CakePHP's PostgresDriver (PostgreSQL backend) - this is the AT:P attack requirement, and MySQL/SQLite/SQL Server deployments are not affected; and (2) application code must pass user-controlled input into the jsonPath (second) argument of FunctionsBuilder::jsonValue(). What limits exploitation: it is not triggerable against default CakePHP behavior - a developer must actively route untrusted data into jsonValue()'s jsonPath, and the app must run on Postgres. No authentication or user interaction is required by the framework flaw itself (PR:N/UI:N), so where the vulnerable pattern exists it is remotely and unauthenticated exploitable. |
| Impact | The CVSS 4.0 base score is 9.2 (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L): network-reachable, low-complexity, unauthenticated, with high confidentiality and integrity impact and low availability impact. The critical qualifier is AT:P (attack requirements present): exploitation depends on the application using the PostgreSQL driver AND passing untrusted input directly into jsonValue()'s jsonPath argument, which is an application coding pattern rather than default framework behavior. No EPSS score, KEV listing, or SSVC data were provided, so exploitation probability cannot be quantified from these signals; the vendor confirms the flaw and ships a patch. Net assessment: genuinely high severity where the vulnerable code path is used (SQLi enables data theft and manipulation), but the AT:P precondition narrows real-world exposure below what the raw 9.2 implies - many CakePHP apps use MySQL/other drivers or never route user input into jsonPath. Priority is high for Postgres-backed CakePHP apps using jsonValue() on user data, moderate otherwise. |
| Exploit ScenarioDerived | A CakePHP application running on PostgreSQL exposes a search or filtering feature that forwards a user-supplied JSON path into $query->func()->jsonValue('column', $userInput). The attacker submits a crafted jsonPath such as "x')) > '0' OR (SELECT 1) --", breaking out of the intended jsonpath expression to inject arbitrary SQL and read or alter database contents. With a network vector, low complexity, and no authentication required by the flaw itself, exploitation is straightforward wherever this coding pattern exists. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 24, 2026
SQL injection in CakePHP's database layer allows attackers to inject arbitrary SQL when an application uses FunctionsBuilder::jsonValue() with the PostgreSQL driver and passes user-controlled data into the jsonPath parameter. Affected release lines are 5.1.x before 5.1.10, 5.2.x before 5.2.15, and 5.3.x before 5.3.7; the root cause is the jsonPath value being interpolated into the generated ::jsonpath expression rather than bound as a parameter. No public exploit identified at time of analysis (not listed in CISA KEV), though the fix commit includes a regression test containing a working injection string.
RemediationAI
Vendor-released patch: upgrade to CakePHP 5.1.10, 5.2.15, or 5.3.7 according to your release line (release tags https://github.com/cakephp/cakephp/releases/tag/5.1.10, /5.2.15, /5.3.7; fix commit 138f2f61486532c29ee4d106da2a9848c1ff1ab3). As an interim workaround where immediate upgrade is not possible, ensure no user-controlled data reaches the jsonPath parameter of FunctionsBuilder::jsonValue() - validate or allowlist jsonPath values to known-safe constants, or avoid jsonValue() on Postgres until patched; the trade-off is refactoring affected queries. Consult advisory GHSA-fxf7-vhh8-7vpq for full details.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 8 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CakePHP is a widely used rapid-development MVC framework for PHP; the flaw lives specifically in its Database component (cakephp/database), in the Postgres driver's _transformFunctionExpression() handling of the jsonValue() query function. jsonValue() maps to PostgreSQL's jsonb/jsonpath querying, and the jsonPath argument (e.g. '$.scores[1]') is meant to be a jsonpath literal. Before the fix, the driver formatted the second argument via sprintf("'%s'::jsonpath", quoteIdentifier(...)) instead of binding it as a parameter, so a value like "x')) > '0' OR (SELECT 1) --" broke out of the intended expression. This is a classic CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) issue caused by string interpolation into SQL; the patch returns the value as a bound jsonb parameter.
Know when Cakephp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Network SQLi with no auth or interaction (PR:N/UI:N), but AC:H reflects the required Postgres driver plus application passing user data into jsonPath; SQLi yields high confidentiality/integrity and low availability impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
CakePHP is a rapid development framework for PHP. Prior to versions 5.1.10, 5.2.15, and 5.3.7 on their respective release lines, FunctionsBuilder::jsonValue() with PostgresDriver is vulnerable to SQL injection when user-controlled data is supplied to the jsonPath parameter. This issue is fixed in versions 5.1.10, 5.2.15, and 5.3.7.
Executive ViewAI
A critical SQL injection vulnerability in CakePHP's database layer threatens data confidentiality and integrity for organizations running affected versions 5.1.x through 5.3.x with PostgreSQL. Successful exploitation could enable attackers to steal, modify, or delete sensitive business data. No public exploit identified at time of analysis, though the high-severity risk profile demands immediate patching across all affected systems.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
The Xml class in CakePHP 2.1.x before 2.1.5 and 2.2.x before 2.2.1 allows remote attackers to read arbitrary files via X
The clientIp function in CakePHP 3.2.4 and earlier allows remote attackers to spoof their IP via the CLIENT-IP HTTP head
CakePHP 2.x and 3.x before 3.1.5 might allow remote attackers to bypass the CSRF protection mechanism via the _method pa
CakePHP is a development framework for PHP web apps. Rated critical severity (CVSS 9.8), this vulnerability is remotely
SQL injection in the CakePHP PHP framework (versions prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7) allows unauthenti
Authentication bypass in the CakePHP Authentication plugin's CookieAuthenticator (versions before 2.11.2, 3.0.0-3.3.6, a
Email header injection in CakePHP's Mailer component allows CRLF sequences embedded in custom header values to split SMT
An issue was discovered in SmtpTransport in CakePHP 3.7.6. Rated high severity (CVSS 7.5), this vulnerability is remotel
Local file inclusion in CakePHP's View::_getElementFileName() allows remote attackers to include arbitrary PHP files fro
CakePHP versions prior to 5.2.12 and 5.3.1 contain a stored cross-site scripting vulnerability in the PaginatorHelper::l
CakePHP before 4.0.6 mishandles CSRF token generation. Rated medium severity (CVSS 4.3), this vulnerability is remotely
EUVD-2026-65121
GHSA-fxf7-vhh8-7vpq
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB