# CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection

Advisory record · `GHSA-vjqc-q4mp-2rvf`

- **Identifiers:** `GHSA-vjqc-q4mp-2rvf` · `CVE-2026-79752` · `PKSA-ny8z-1rqf-8z42` · `PKSA-vxgj-bmcq-9b6x`
- **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:** 17 Sept 2026
- **Updated:** 24 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 17 Sept 2026, 20:28 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/database` (Packagist): affected `>=3.0.0, <4.5.12 || >=4.6.0, <4.6.5 || >=5.0.0, <5.1.9 || >=5.2.0, <5.2.14 || >=5.3.0, <5.3.7`; fixed in `4.5.12`, `4.6.5`, `5.1.9`, `5.2.14`, `5.3.7`
- `cakephp/cakephp` (Packagist): affected `<4.5.12 || >=4.6.0, <4.6.5 || >=5.0.0, <5.1.9 || >=5.2.0, <5.2.14 || >=5.3.0, <5.3.7`; fixed in `4.5.12`, `4.6.5`, `5.1.9`, `5.2.14`, `5.3.7`

## Machine-written summary

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

> CakePHP's FunctionsBuilder in the cakephp/cakephp and cakephp/database Packagist packages is vulnerable to SQL injection in its cast, extract, datePart and dateAdd methods. An attacker can exploit this when user-controlled data reaches the dataType, part or unit parameters, and the source does not describe the required access level. Upgrade to cakephp/cakephp 4.5.12, 4.6.5, 5.1.9, 5.2.14 or 5.3.7, or to the matching cakephp/database release; the source's workaround is to avoid passing user-controlled data to these parameters.

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:H/SC:N/SI:N/SA:N`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0062, the 50th percentile, on 10 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 13:54 UTC: First seen by agentprime
- 31 Oct 2026, 13:54 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-vjqc-q4mp-2rvf)

## Sources

- [GitHub Advisory Database: GHSA-vjqc-q4mp-2rvf](https://github.com/advisories/GHSA-vjqc-q4mp-2rvf)
- [OSV: GHSA-vjqc-q4mp-2rvf](https://osv.dev/vulnerability/GHSA-vjqc-q4mp-2rvf)
- <https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-79752>
- <https://github.com/cakephp/cakephp/pull/19528>
- <https://github.com/cakephp/cakephp/pull/19520>
- <https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676>
- <https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d>
- <https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45>
- <https://github.com/cakephp/cakephp/commit/4730e774bd3b9caa90d67af49e27a12033ec3c71>
- <https://github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e>
- <https://github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0>
- <https://github.com/cakephp/cakephp/releases/tag/4.5.12>
- <https://github.com/cakephp/cakephp/releases/tag/4.6.5>

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-vjqc-q4mp-2rvf>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-vjqc-q4mp-2rvf/>. Everything for agents: <https://agentprime.io/llms.txt>.
