Intel

AIKIDO-2024-10535

cakephp/cakephp is vulnerable to Improper Encoding or Escaping of Output

Improper Encoding or Escaping of Output Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Dec 16, 2024

19

Low Risk

This Affects:

phpcakephp/cakephp
4.0.0 - 5.1.3
Fixed in 5.1.4
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to improper output encoding or escaping. The issue stems from using PATH_INFO instead of REQUEST_URI. Since PATH_INFO includes URL-decoded values, encoded URLs may improperly match routes they should not, leading to security risks. This flaw allows characters like %2f to bypass routing restrictions, potentially exposing unintended resources. Switching to REQUEST_URI ensures proper handling of encoded URLs and mitigates this vulnerability.

Who does this affect?

You are affected if you are using a vulnerable version of the package.

Background info

cakephp/cakephp is vulnerable to Improper Encoding or Escaping of Output in versions 4.0.0 - 5.1.3.

How to fix this

Upgrade the cakephp/cakephp library to the patch version.