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

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

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.

Technologies: Cakephp, cakephp/cakephp (Packagist). Vendors: Cakephp, Packagist.

Quick answers

Is CVE-2026-48820 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-48820 being exploited in the wild.
How severe is CVE-2026-48820?
Medium severity, with a CVSS score of 4, published 17 June 2026.
Which products and versions are affected?
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; cakephp/cakephp (Packagist) ECOSYSTEM:introduced=5.3.0,fixed=5.3.6.
Is there a fix for CVE-2026-48820?
Yes. cakephp/cakephp (Packagist): upgrade to 5.3.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-48820 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-48820?
Check whether you run Cakephp or cakephp/cakephp (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • cakephp/cakephp (Packagist): upgrade to 5.3.6 or later
    composer require cakephp/cakephp:^5.3.6

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

Identifiers

  • CVE-2026-48820
  • GHSA-wpvj-hjcr-h3p2

Timeline

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.