
Pack de divulgation et PoC Python pour CVE-2026-77635, une injection SQL non authentifiée dans jsonValue() de CakePHP avec PostgresDriver, incluant un lab Docker en loopback.
abraxaslabs.tech · github.com/abraxas · @abraxas_null · CVE-2026-77635
CakePHP 5.2.13 — cakephp
CakePHP est un framework de développement rapide pour PHP. Avant les versions 5.1.10, 5.2.15 et 5.3.7 sur leurs lignes de publication respectives, FunctionsBuilder::jsonValue() avec PostgresDriver est vulnérable à une injection SQL lorsque des données contrôlées par l'utilisateur sont fournies au paramètre jsonPath. Ce problème est corrigé dans les versions 5.1.10, 5.2.15 et 5.3.7.
| CVE | CVE-2026-77635 · CVE.org |
| CWE | CWE-89 |
| CVSS | Critique : 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 |
| Produit | CakePHP |
| Affecté | 5.2.x jusqu'à 5.2.13 (également 5.1.x < 5.1.10, 5.3.x < 5.3.7) |
| Corrigé | 5.2.15, 5.1.10, 5.3.7 |
| Auth | aucune (voir la carte source) |
| Licence | GNU Affero GPL v3.0 |
| Lab | 127.0.0.1 uniquement · pack de divulgation fournisseur/client, pas un scanner |
jsonValue $jsonPath est le point d'aboutissement. HTTP est GET /?path= sur l'application du lab.
GET/?path=GET /?path=<jsonPath injecté>PostgresDriver quoteIdentifier dans JSONB_PATH_QUERYSELECT leaks notes.secretPOCWitness77635 dans le corps HTTP et sql= contient le fragment injecté.
À faire en premier : Mettez à jour CakePHP vers 5.2.15 (ou 5.1.10 / 5.3.7). Avis : GHSA-fxf7-vhh8-7vpq.
Vérifier après la mise à niveau
CVE-2026-77635-Abraxas-Labs.py contre la version corrigée : le témoin mappé ne doit pas apparaître.Si vous ne pouvez pas mettre à jour immédiatement
Ciblez uniquement http://127.0.0.1:8088 (ou le loopback que vous avez lié). Ne pointez pas ce script vers Internet.
python3 CVE-2026-77635-Abraxas-Labs.py
Le succès correspond au témoin ci-dessus dans le corps de la réponse. Un HTML 200 générique n'est pas cela.
Pile loopback utilisée pour reproduire. Images officielles sauf si un Dockerfile dans ce dossier construit depuis les sources.
cd lab
docker compose up --force-recreate
Liez l'arborescence du produit vulnérable à côté de Compose si le YAML monte un répertoire local (zip du plugin / tag source issu du tableau des versions). Ne publiez rien d'autre que 127.0.0.1.
github.com/cakephp/cakephp/commit/138f2f61486532c29ee4d106da2a9848c1ff1ab3
github.com/cakephp/cakephp/commit/489a40fb7c6e597af33fe0f7264047afccb90d55
github.com/cakephp/cakephp/commit/9f1ad970a3b72293d4a37e694276645f804e819f
github.com/cakephp/cakephp/security/advisories/GHSA-fxf7-vhh8-7vpq
github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77635.json
Abraxas Labs : abraxaslabs.tech · github.com/abraxas · @abraxas_null
# CVE-2026-77635 (structured records)
- input: `https://nvd.nist.gov/vuln/detail/CVE-2026-77635`
- CWE: CWE-89
- published: 2026-08-24T21:17:48.457
## NVD 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.
## MITRE 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.
## Affected
- cakephp cakephp >= 5.1.0, < 5.1.10 affected, >= 5.2.0, < 5.2.15 affected, >= 5.3.0, < 5.3.7 affected
- cakephp cakephp/database >= 5.1.0, < 5.1.10 affected, >= 5.2.0, < 5.2.15 affected, >= 5.3.0, < 5.3.7 affected
- OSV:
## References (JSON sources only)
- 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/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
- https://github.com/cakephp/cakephp/security/advisories/GHSA-fxf7-vhh8-7vpq
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77635.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-77635
- https://github.com/advisories/GHSA-fxf7-vhh8-7vpq
## GitHub advisory
CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver
### Impact
The `FunctionsBuilder::jsonValue($field, $jsonPath)` methods with the Postgres driver is vulnerable to SQL injection if user controlled data is supplied to the `$jsonPath` parameter.
### Patches
5.1.10, 5.2.15, 5.3.7
### Workarounds
Don't provide user controlled data to these functions/parameters.
## OSV
CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver
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.
Ce pack de divulgation est sous licence GNU Affero General Public License v3.0. Voir LICENSE.
Ce pack est destiné au fournisseur, au propriétaire du site et aux labs autorisés. Le script communique avec 127.0.0.1. Son utilisation contre des systèmes que vous ne possédez pas n'est pas autorisée par Abraxas Labs. Aucune garantie.