Junglewise Threat Intelligence

CVE-2026-48820: CakePHP path traversal and file inclusion in View component

CVE-2026-48820 · Severity: medium · CVSS 6.3 · Published 2026-06-17

Executive brief

CakePHP is a popular web development framework used to build PHP applications. A vulnerability in how it handles template files could allow an attacker to force the application to include and execute unintended PHP files from the server. This could lead to the exposure of sensitive internal data or unauthorized code execution if the application uses user-provided input to determine which template components to load.

Technical details

A path traversal vulnerability exists in CakePHP's View::_getElementFileName() method. The component fails to verify that a resolved element path remains within the designated application or plugin view template directories. If an application passes unvalidated user-supplied data into the element name, an attacker can use directory traversal sequences to include arbitrary PHP files from the server's filesystem. This is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). Patches are available in versions 5.3.6, 5.2.13, 5.1.7, 4.6.4, and 4.5.11.

Affected products

  • CakePHP CakePHP < 4.5.11, >= 4.6.0, < 4.6.4, >= 5.0.0, < 5.1.7, >= 5.2.0, < 5.2.13, >= 5.3.0, < 5.3.6

Timeline

  • 2026-05-24: disclosed
  • 2026-06-17: advisory: NVD publication
  • 2026-06-26: patched: GitHub Advisory published/reviewed

References

Related threats