Summary
CVE-2026-77635 is a SQL injection vulnerability (CWE-89) in the CakePHP framework’s PostgreSQL database driver, specifically in the FunctionsBuilder::jsonValue($field, $jsonPath) method. When an application passes user-controlled data into the $jsonPath parameter, an attacker can inject arbitrary SQL, leading to potential data disclosure and manipulation. The issue carries a critical CVSS score of 9.2 and affects multiple 5.x release lines of CakePHP.
Technical details
- Root cause:
FunctionsBuilder::jsonValue()builds a SQL fragment for JSON path queries against PostgreSQL without properly neutralizing special characters in the$jsonPathargument. - Trigger condition: An application must pass user-supplied (attacker-controlled) input directly into the
$jsonPathparameter ofjsonValue()when using CakePHP’s PostgreSQL driver. - Attack vector: Network — exploitation occurs through normal application requests that reach vulnerable query-building code, requiring no authentication or user interaction.
- Impact: High confidentiality and integrity impact (unauthorized read/modification of database contents) with low availability impact, consistent with a SQL injection allowing attacker-controlled queries to execute against the backend PostgreSQL database.
Affected software
- cakephp/cakephp: 5.1.0 – 5.1.9
- cakephp/cakephp: 5.2.0 – 5.2.14
- cakephp/cakephp: 5.3.0 – 5.3.6
- cakephp/database: 5.1.0 – 5.1.9
- cakephp/database: 5.2.0 – 5.2.14
- cakephp/database: 5.3.0 – 5.3.6
Severity
- CVSS v4.0 Base Score: 9.2 (Critical)
- Vector: 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
Mitigation and recommended actions
- Immediate: Upgrade to the patched releases — CakePHP 5.1.10, 5.2.15, or 5.3.7, depending on the branch in use.
- If patching is not immediately possible: Do not pass user-controlled data into
FunctionsBuilder::jsonValue()or its$jsonPathparameter; validate/sanitize any input that reaches this function, and review application code for other call sites that forward request data into PostgreSQL JSON path queries.
How IONIX identifies potentially affected assets
IONIX matches the following signal against data already collected when it crawled the asset; identifying the technology sends no request beyond that crawl.
- Meta tag
application-name:CakePHP

