CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriverGHSA-fxf7-vhh8-7vpq
Fix: cakephp/cakephp@138f2f6GHSA-fxf7-vhh8-7vpq is a SQL Injection vulnerability in cakephp/cakephp. A fix is available for cakephp/cakephp — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fxf7-vhh8-7vpq.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
cakephp/cakephp🐘cakephp/cakephp🐘cakephp/cakephp🐘cakephp/database🐘cakephp/database🐘cakephp/databaseReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | cakephp/cakephp | ≥ 5.3.0&&< 5.3.7 | 5.3.7composer require cakephp/cakephp:^5.3.7 |
| 🐘Packagist | cakephp/cakephp | ≥ 5.2.0&&< 5.2.15 | 5.2.15composer require cakephp/cakephp:^5.2.15 |
| 🐘Packagist | cakephp/cakephp | ≥ 5.1.0&&< 5.1.10 | 5.1.10composer require cakephp/cakephp:^5.1.10 |
| 🐘Packagist | cakephp/database | ≥ 5.3.0&&< 5.3.7 | 5.3.7composer require cakephp/database:^5.3.7 |
| 🐘Packagist | cakephp/database | ≥ 5.2.0&&< 5.2.15 | 5.2.15composer require cakephp/database:^5.2.15 |
| 🐘Packagist | cakephp/database | ≥ 5.1.0&&< 5.1.10 | 5.1.10composer require cakephp/database:^5.1.10 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for cakephp/cakephp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update cakephp/cakephp to 5.3.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fxf7-vhh8-7vpq is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
Frequently Asked Questions
Is GHSA-fxf7-vhh8-7vpq in your dependencies?
Find it across Packagist, including transitive dependencies.