MediumGHSA-wpvj-hjcr-h3p2CVE-2026-48820

CakePHP: View::element() is missing a path containment check

Published 26 Jun 2026 · Updated 10 Sept 2026

Affected packages

Affected
>=5.3.0 <5.3.6
Fixed in
5.3.6
Update to the fixed version for your release line, for example:composer require cakephp/cakephp:^5.3.6
Affected
>=5.2.0 <5.2.13
Fixed in
5.2.13
Update to the fixed version for your release line, for example:composer require cakephp/cakephp:^5.2.13
Affected
>=5.0.0 <5.1.7
Fixed in
5.1.7
Update to the fixed version for your release line, for example:composer require cakephp/cakephp:^5.1.7
Affected
>=4.6.0 <4.6.4
Fixed in
4.6.4
Update to the fixed version for your release line, for example:composer require cakephp/cakephp:^4.6.4
Affected
<4.5.11
Fixed in
4.5.11
Update to the fixed version for your release line, for example:composer require cakephp/cakephp:^4.5.11

Details

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.

Is GHSA-wpvj-hjcr-h3p2 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected cakephp/cakephp, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.