# CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver

Advisory record · `GHSA-fxf7-vhh8-7vpq`

- **Identifiers:** `GHSA-fxf7-vhh8-7vpq` · `CVE-2026-77635` · `PKSA-d2h7-11vv-v66p` · `PKSA-xyyq-wf7k-89mv`
- **State:** Confirmed
- **Severity:** CVSS 9.2 Critical
- **Critical:** Yes: CVSS 9+
- **Weakness (CWE):** [CWE-89](https://cwe.mitre.org/data/definitions/89.html)
- **Tags:** [SQL injection](https://agentprime.io/advisories/tag/sql-injection.md)
- **Published:** 8 Sept 2026
- **Updated:** 8 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 8 Sept 2026, 20:56 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Critical

Critical, because:

- CVSS score 9.2: 9.0 or more.

How we decide what’s critical: <https://agentprime.io/advisories/critical.md>

## Affected packages

- `cakephp/cakephp` (Packagist): affected `>=5.3.0, <5.3.7 || >=5.2.0, <5.2.15 || >=5.1.0, <5.1.10`; fixed in `5.3.7`, `5.2.15`, `5.1.10`
- `cakephp/database` (Packagist): affected `>=5.3.0, <5.3.7 || >=5.2.0, <5.2.15 || >=5.1.0, <5.1.10`; fixed in `5.3.7`, `5.2.15`, `5.1.10`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> CakePHP's FunctionsBuilder::jsonValue() method, when used with the PostgreSQL driver, is vulnerable to SQL injection in the cakephp/cakephp and cakephp/database Packagist packages, versions from 5.1.0 to before 5.1.10, 5.2.0 to before 5.2.15, and 5.3.0 to before 5.3.7. An attacker would need to influence the jsonPath parameter with user-controlled data, which could allow them to inject SQL into queries. Upgrade to 5.1.10, 5.2.15, 5.3.7, or a later release in the relevant series; until then, do not pass user-controlled data to that parameter.

Written 31 Oct 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 9.2 Critical, CVSS 4.0: `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`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0049, the 42nd percentile, on 11 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:06 UTC: First seen by agentprime
- 31 Oct 2026, 14:06 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-fxf7-vhh8-7vpq)

## Sources

- [GitHub Advisory Database: GHSA-fxf7-vhh8-7vpq](https://github.com/advisories/GHSA-fxf7-vhh8-7vpq)
- [OSV: GHSA-fxf7-vhh8-7vpq](https://osv.dev/vulnerability/GHSA-fxf7-vhh8-7vpq)
- <https://github.com/cakephp/cakephp/security/advisories/GHSA-fxf7-vhh8-7vpq>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-77635>
- <https://github.com/cakephp/cakephp/commit/138f2f61486532c29ee4d106da2a9848c1ff1ab3>
- <https://github.com/cakephp/cakephp/commit/489a40fb7c6e597af33fe0f7264047afccb90d55>
- <https://github.com/cakephp/cakephp/commit/9f1ad970a3b72293d4a37e694276645f804e819f>
- <https://github.com/cakephp/cakephp>
- <https://github.com/cakephp/cakephp/releases/tag/5.1.10>
- <https://github.com/cakephp/cakephp/releases/tag/5.2.15>
- <https://github.com/cakephp/cakephp/releases/tag/5.3.7>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-fxf7-vhh8-7vpq>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-fxf7-vhh8-7vpq/>. Everything for agents: <https://agentprime.io/llms.txt>.
