CakePHP: View::element() is missing a path containment check
Impact
View::_getElementFileName() does not check that the resolved element path is within the application/plugin view template paths. When element names are created with specifically crafted user-supplied data this weakness can be leveraged to include other PHP files on the server.
Patches
Patched releases are available in 5.3.6, 5.2.13, 5.1.7, 4.6.4, and 4.5.11.
Workarounds
If developers are not using user-supplied data in element names, no action is required.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | cakephp/cakephp | >= 5.3.0, < 5.3.6, >= 5.2.0, < 5.2.13, >= 5.0.0, < 5.1.7, >= 4.6.0, < 4.6.4, < 4.5.11 | 5.3.6, 5.2.13, 5.1.7, 4.6.4, 4.5.11 |
References
- CVSS vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-22- Platform
- Composer
- Package
cakephp/cakephp- Disclosed
- 26.06.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-wpvj-hjcr-h3p2 - CC BY 4.0
Vulnerability history: cakephp/cakephp
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 22
- First → latest
- 12.2019 09.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
- High 8
- Medium 11
Disclosures per year
- 2019: 1
- 2020: 0
- 2021: 0
- 2022: 9
- 2023: 7
- 2024: 0
- 2025: 0
- 2026: 5
-
CakePHP: View::element() is missing a path containment check this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.