# CVE-2026-79752: CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.2
- **CVSS:** 9.2 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.62% (percentile 44, 2026-11-26)
- **CWE:** CWE-89
- **Aliases:** GHSA-vjqc-q4mp-2rvf
- **Published:** 2026-09-17T14:49:56.936Z
- **Modified:** 2026-09-30T17:43:24.057Z

## Who should check

- Projects that depend on Packagist package cakephp/database (\>= 3.0.0, \< 4.5.12)
- Projects that depend on Packagist package cakephp/cakephp (\< 4.5.12)
- Anyone running cakephp \< 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

## Description

CakePHP is a rapid development framework for PHP. Prior to 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7, FunctionsBuilder::cast, FunctionsBuilder::extract, FunctionsBuilder::datePart, and FunctionsBuilder::dateAdd in src/Database/FunctionsBuilder.php accept user-controlled dataType, part, or unit values and incorporate them into generated SQL as unescaped structural fragments. An application that passes untrusted input to these parameters can permit SQL injection with confidentiality, integrity, and availability impact according to the database connection's privileges. This issue is fixed in versions 4.5.12, 4.6.5, 5.1.9, 5.2.14, and 5.3.7.

## Affected and fixed versions

- Packagist `cakephp/database`: affected \>= 3.0.0, \< 4.5.12; fixed 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 (osv)
- Packagist `cakephp/cakephp`: affected \< 4.5.12; fixed 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 (osv)
- cakephp: \< 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 (cvelist)

## Mitigation

- Upgrade cakephp/database to one of 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 (or later in the same release line).
- Upgrade cakephp/cakephp to one of 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-79752. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-79752.md
Affected: cakephp/database >= 3.0.0, < 4.5.12; cakephp/cakephp < 4.5.12
Fixed in: 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7

Steps:
1. Search this machine and project for cakephp/database (Packagist), cakephp/cakephp (Packagist), cakephp: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-79752 being exploited?

There is no confirmed exploitation: CVE-2026-79752 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.62% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-79752?

Critical: CVSS 9.2 (v4.0, scored by CNA). Remote, no login needed.

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

cakephp/database \>= 3.0.0, \< 4.5.12; cakephp/cakephp \< 4.5.12.

### Is there a fix for CVE-2026-79752?

Yes. Fixed in 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7. Upgrade cakephp/database to one of 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 (or later in the same release line). Upgrade cakephp/cakephp to one of 4.5.12, 4.6.5, 5.1.9, 5.2.14, 5.3.7 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-79752?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/cakephp/cakephp/security/advisories/GHSA-vjqc-q4mp-2rvf>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-79752>
- patch: <https://github.com/cakephp/cakephp/pull/19520>
- patch: <https://github.com/cakephp/cakephp/pull/19528>
- patch: <https://github.com/cakephp/cakephp/commit/3349584ca3a891afaff2dbc324d6b1c09fb880f0>
- patch: <https://github.com/cakephp/cakephp/commit/3f4d13ea4280067f3381ecf935a8bef5b7cdcc2e>
- patch: <https://github.com/cakephp/cakephp/commit/79e1d6bc6f3a50fa01805579076a02c77370c676>
- patch: <https://github.com/cakephp/cakephp/commit/8699d6f38e25fe46fcc24f2b698809948e71ad7d>
- patch: <https://github.com/cakephp/cakephp/commit/ab608711674ac662af7315c5cdf1e0fbe2000e45>
- patch: <https://github.com/cakephp/cakephp/commit/4730e774bd3b9caa90d67af49e27a12033ec3c71>
- other: <https://github.com/cakephp/cakephp/releases/tag/4.5.12>
- other: <https://github.com/cakephp/cakephp/releases/tag/4.6.5>
- other: <https://github.com/cakephp/cakephp/releases/tag/5.1.9>
- other: <https://github.com/cakephp/cakephp/releases/tag/5.2.14>
- other: <https://github.com/cakephp/cakephp/releases/tag/5.3.7>
- other: <https://github.com/cakephp/cakephp/releases/tag/5.1.8>
- other: <https://github.com/cakephp/cakephp>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-79752>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-vjqc-q4mp-2rvf> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-79752> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-79752>
