CVE-2026-77635: CakePHP SQL Injection Bug - What It Means for Your Business and How to Respond
Introduction
CVE-2026-77635 is a critical vulnerability in CakePHP, a widely used PHP web development framework. It affects applications that use CakePHP’s PostgreSQL database driver and pass customer-controlled input into a specific database query feature. For organizations in the United States and Canada, the concern is straightforward: a web application built on an affected version could allow an attacker to interact with the underlying database without legitimate credentials.
This matters because many business-critical systems, including customer portals, e-commerce platforms, internal dashboards, and partner applications, rely on web frameworks like CakePHP. If your organization operates one of these applications, the vulnerability could expose sensitive records, alter business data, or disrupt service availability.
This post explains what CVE-2026-77635 is, which businesses should pay attention, how the risk translates into operational and compliance exposure, and what your team should do to detect and remediate it. A technical appendix provides version checks, detection guidance, and remediation steps for security engineers and IT teams.
Background & History
CVE-2026-77635 was published on August 24, 2026, through GitHub’s maintainer security advisory process, which serves as the CVE Numbering Authority for the issue. The vulnerability affects CakePHP and the separate cakephp/database package across three release lines: versions 5.1.0 through 5.1.9, 5.2.0 through 5.2.14, and 5.3.0 through 5.3.6.
The flaw is a SQL injection weakness in the FunctionsBuilder::jsonValue() method when an application uses CakePHP’s PostgreSQL driver. In practical terms, if user-supplied data reaches the jsonPath parameter, an attacker may be able to alter the database query the application sends. The issue is classified as CWE-89, improper neutralization of special elements used in an SQL command.
GitHub assigned the vulnerability a CVSS v4.0 base score of 9.2, rating it Critical. The score reflects network-based exploitation, low attack complexity, no required privileges or user interaction, and high potential impact on confidentiality and integrity. Fixed releases are CakePHP 5.1.10, 5.2.15, and 5.3.7.
What This Means for Your Business
If your organization runs a CakePHP application connected to PostgreSQL, this vulnerability can turn a public web feature into a direct path to your database. The most immediate risk is unauthorized access to information your customers trust you to protect: names, contact details, order histories, account identifiers, payment-related metadata, support records, or internal business data.
The impact extends beyond data theft. Because SQL injection can also modify or delete records, an attacker could corrupt inventory levels, alter customer profiles, change transactional records, or interfere with application workflows. Even where data is not stolen, restoring trust after suspected tampering can require forensic review, customer communication, and manual reconciliation.
Operationally, an incident may force you to take an application offline, rotate database credentials, restore from backups, and pause integrations with payment processors, logistics providers, or partner systems. Those activities create downtime and divert staff from normal business priorities.
There are also regulatory and contractual consequences. Organizations subject to United States or Canadian privacy laws, sector-specific rules, or customer security requirements may need to assess whether personal information was accessed, notify affected parties, and document their response. A preventable vulnerability in a core application framework can become evidence of weak patching and application-security controls during an audit, breach investigation, or customer due-diligence review.
Real-World Examples
Regional financial services provider: A regional bank uses a CakePHP-based customer onboarding portal connected to PostgreSQL. If the portal passes a customer-controlled search or filtering value into the vulnerable JSON path parameter, an attacker could attempt to extract customer records or manipulate application data. The institution could face regulatory scrutiny, mandatory incident response activities, and erosion of customer confidence.
Mid-sized e-commerce retailer: An online retailer uses CakePHP for product search, account management, or order-status features. Exploitation could expose customer contact information and order details, or alter inventory and pricing records. The business may need to invalidate sessions, review recent transactions, notify customers, and reconcile orders during a high-revenue period.
Healthcare technology vendor: A vendor operating a patient-scheduling or provider portal could face heightened consequences if exploitation exposes protected health information. Beyond notification obligations, the organization may need to demonstrate that clinical workflows, audit logs, and data-integrity controls remained reliable throughout the incident.
Small professional-services firm: A smaller firm running a client portal may assume it is too small to be targeted. Automated attackers do not distinguish by company size. A successful exploit could expose client files, contact records, or invoicing data, creating reputational damage and potential legal exposure disproportionate to the firm’s size.
Am I Affected?
- You are running CakePHP version 5.1.0 through 5.1.9, 5.2.0 through 5.2.14, or 5.3.0 through 5.3.6.
- You use the
cakephp/databasepackage in one of those same affected version ranges. - Your application connects to PostgreSQL through CakePHP’s PostgreSQL driver.
- Your application passes user-controlled input, request parameters, headers, or API fields into the
jsonPathargument ofFunctionsBuilder::jsonValue(). - You expose the affected functionality through a public website, customer portal, mobile-application backend, partner API, or internally accessible web application.
- You are unsure which framework versions your PHP applications use, particularly if applications are maintained by different teams or vendors.
- You have already upgraded to CakePHP 5.1.10, 5.2.15, or 5.3.7 on the applicable release line, in which case the known vulnerability is fixed.
Key Takeaways
- CVE-2026-77635 is a critical SQL injection vulnerability in CakePHP’s PostgreSQL database functionality.
- Applications are exposed when user-controlled data reaches the vulnerable
jsonPathparameter, not merely because they use an affected CakePHP version. - Successful exploitation can expose, alter, or delete business data, creating operational disruption, reputational harm, and compliance obligations.
- Organizations should inventory CakePHP applications immediately and prioritize internet-facing systems that use PostgreSQL.
- The reliable fix is to upgrade to CakePHP 5.1.10, 5.2.15, or 5.3.7, depending on the application’s release line.
Call to Action
If you operate CakePHP applications, do not wait for an attacker to determine whether your JSON query features are exploitable. IntegSec can help you identify affected systems, validate real-world exploitability, test your database and application controls, and prioritize remediation based on business risk. Visit https://integsec.com to schedule a penetration test and strengthen your organization’s cybersecurity posture.
Technical Appendix
A — Technical Analysis
CVE-2026-77635 arises from improper neutralization of user-controlled data in FunctionsBuilder::jsonValue() when used with PostgresDriver. The method constructs a PostgreSQL JSON query expression, and the jsonPath argument is incorporated into the resulting SQL without sufficient quoting or parameter binding. An attacker who can influence that value may terminate the intended JSON path context and inject SQL syntax.
The affected components are cakephp/cakephp and cakephp/database in the identified version ranges. The attack vector is network-based, with low attack complexity and no privileges or user interaction required. The CVSS v4.0 vector is 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, producing a Critical base score of 9.2. The weakness maps to CWE-89, SQL Injection.
The attack prerequisite is application-specific: user-controlled data must reach jsonPath. Applications that use only static, developer-defined JSON paths are not vulnerable through this code path, even if they run an affected framework version. Public references include the GitHub maintainer advisory at https://github.com/cakephp/cakephp/security/advisories/GHSA-fxf7-vhh8-7vpq and the NVD entry for CVE-2026-77635.
B — Detection & Verification
Version enumeration commands:

Scanner signatures: Configure vulnerability scanners and software-composition analysis tools to flag cakephp/cakephp or cakephp/database at versions below 5.1.10, 5.2.15, or 5.3.7 on their respective branches. Scanner coverage should include deployed containers, server filesystems, and source repositories, not only production application servers.
Log indicators: Review web-server, application, and database logs for unexpected SQL syntax, PostgreSQL errors involving JSON operators or path expressions, malformed query fragments, and requests containing JSON path-like values. Pay particular attention to fields whose values are passed into jsonValue().
Behavioral anomalies: Look for unusual database read volumes, queries returning unexpectedly large result sets, new or modified records outside normal business workflows, failed queries followed by successful unusual queries, and authentication or session activity inconsistent with normal user behavior.
Network exploitation indicators: Monitor for HTTP requests that supply JSON path syntax, quote characters, SQL operators, comments, or subquery patterns to parameters associated with JSON filtering. Correlate those requests with PostgreSQL errors, elevated query latency, or subsequent data-access activity.
C — Mitigation & Remediation
- Immediate (0–24 hours): Identify every CakePHP application and deployment environment, including staging, disaster recovery, containers, and vendor-managed systems. Upgrade affected applications to the official patched release for their branch: 5.1.10, 5.2.15, or 5.3.7.
- Short-term (1–7 days): Where immediate patching is not possible, remove or restrict any code path that sends user-controlled data to the
jsonPathargument ofFunctionsBuilder::jsonValue(). Replace dynamic values with an allowlist of known JSON paths, validate input against a strict format, and ensure database accounts use least-privilege permissions. Review PostgreSQL and application logs for exploitation attempts, rotate database credentials if compromise is suspected, and verify backups are intact and restorable. - Long-term (ongoing): Incorporate dependency scanning into the build pipeline, track framework and library versions in a software bill of materials, and require security review for code that constructs database queries from user input. Add regression tests for JSON query handling, enforce least-privilege database roles, and include web application and API penetration testing in your regular assurance program.
The vendor patch is the primary remediation. Interim code changes reduce exposure but should not replace upgrading to an officially supported fixed release.
D — Best Practices
- Treat all user-controlled input as untrusted, especially values used in database query construction.
- Use parameterized queries, bound values, and framework-provided safe APIs rather than string concatenation.
- Apply strict allowlists for JSON paths, field names, sort directions, and other query-shaping values.
- Run software-composition analysis continuously across source code, containers, and deployed environments.
- Grant application database accounts only the privileges required for their function, and separate read-heavy reporting roles from transactional roles.
- Test critical web applications and APIs periodically with qualified penetration testing to validate that injection defenses work under realistic attack conditions
Leave Comment