CVE-2026-48820: 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.
Published Jun 26, 2026
Affected packages
cakephp/cakephp
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.3.0, < 5.3.6
- Fixed in
- 5.3.6
- Check
composer show cakephp/cakephp
cakephp/cakephp
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.2.0, < 5.2.13
- Fixed in
- 5.2.13
- Check
composer show cakephp/cakephp
cakephp/cakephp
- Ecosystem
- Composer (PHP)
- Affected
- >= 5.0.0, < 5.1.7
- Fixed in
- 5.1.7
- Check
composer show cakephp/cakephp
cakephp/cakephp
- Ecosystem
- Composer (PHP)
- Affected
- >= 4.6.0, < 4.6.4
- Fixed in
- 4.6.4
- Check
composer show cakephp/cakephp
cakephp/cakephp
- Ecosystem
- Composer (PHP)
- Affected
- < 4.5.11
- Fixed in
- 4.5.11
- Check
composer show cakephp/cakephp
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to zxcvbbq, get-wright, markstory, dereuromark.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-79752
CakePHP: Multiple methods in FunctionsBuilder vulnerable to SQL injection
critical9.2Sep 17, 2026CVE-2026-77634
CakePHP: SmtpTransport vulnerable to CRLF header injection
high8.2Sep 8, 2026CVE-2026-77635
CakePHP: FunctionsBuilder::jsonValue() vulerable to SQL injection with PostgresDriver
critical9.2Sep 8, 2026CVE-2026-23643
CakePHP PaginatorHelper::limitControl() vulnerable to reflected cross-site-scripting
medium5.4Jan 16, 2026
