# CVE-2026-77635: CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver

> Attackers can execute arbitrary SQL commands via the jsonPath parameter in CakePHP's FunctionsBuilder when using PostgresDriver.

- **Severity:** Critical 9.2 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Aug 2026
- **Updated:** 25 Aug 2026
- **Also known as:** DEBIAN-CVE-2026-77635, GHSA-fxf7-vhh8-7vpq, UBUNTU-CVE-2026-77635

## What is CVE-2026-77635?

CVE-2026-77635 is a critical SQL injection vulnerability in cakephp, published on 24 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2026-77635?

12 open source packages ship an affected version, including cakephp/cakephp and cakephp/database.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cakephp/cakephp` | Packagist | From 5.1.0 | 5.1.10 |
| `cakephp/cakephp` | Packagist | From 5.1.0 | 5.1.10 |
| `cakephp/cakephp` | Packagist | From 5.2.0 | 5.2.15 |
| `cakephp/cakephp` | Packagist | From 5.2.0 | 5.2.15 |
| `cakephp/cakephp` | Packagist | From 5.3.0 | 5.3.7 |
| `cakephp/cakephp` | Packagist | From 5.3.0 | 5.3.7 |
| `cakephp/database` | Packagist | From 5.1.0 | 5.1.10 |
| `cakephp/database` | Packagist | From 5.1.0 | 5.1.10 |
| `cakephp/database` | Packagist | From 5.2.0 | 5.2.15 |
| `cakephp/database` | Packagist | From 5.2.0 | 5.2.15 |
| `cakephp/database` | Packagist | From 5.3.0 | 5.3.7 |
| `cakephp/database` | Packagist | From 5.3.0 | 5.3.7 |

## How do I fix CVE-2026-77635?

Upgrade cakephp/cakephp to a fixed version for your release line: 5.1.10, 5.2.15 or 5.3.7.

## Is CVE-2026-77635 being exploited?

There is no known exploitation of CVE-2026-77635 in the wild and no public exploit code.

Public exploit code:

- CVE-2026-77635 - CakePHP - Critical 9.2 - Unauthenticated GET /?path= - SQL Injection (github_poc): https://github.com/abraxas/CVE-2026-77635

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-77635 and fix it if it is affected.

What it is: CVE-2026-77635 is a critical SQL injection vulnerability in cakephp, published on 24 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-77635 in the wild and no public exploit code.

Affected packages and fixed versions:
- cakephp/cakephp (Packagist): affected from 5.1.0; fixed in 5.1.10
- cakephp/cakephp (Packagist): affected from 5.1.0; fixed in 5.1.10
- cakephp/cakephp (Packagist): affected from 5.2.0; fixed in 5.2.15
- cakephp/cakephp (Packagist): affected from 5.2.0; fixed in 5.2.15
- cakephp/cakephp (Packagist): affected from 5.3.0; fixed in 5.3.7
- cakephp/cakephp (Packagist): affected from 5.3.0; fixed in 5.3.7
- cakephp/database (Packagist): affected from 5.1.0; fixed in 5.1.10
- cakephp/database (Packagist): affected from 5.1.0; fixed in 5.1.10
- cakephp/database (Packagist): affected from 5.2.0; fixed in 5.2.15
- cakephp/database (Packagist): affected from 5.2.0; fixed in 5.2.15
- cakephp/database (Packagist): affected from 5.3.0; fixed in 5.3.7
- cakephp/database (Packagist): affected from 5.3.0; fixed in 5.3.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-77635/ (Markdown: https://insights.sbomify.com/CVE-2026-77635/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-77635
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-77635
- OSV: https://osv.dev/vulnerability/CVE-2026-77635

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-77635/
Summaries are generated and may contain mistakes; the official description above is the record.
