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

Source: https://junglewise.ai/threats/cve-2026-48820-cakephp-path-traversal-and-file-inclusion-in-view-component  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-17. Updated: 2026-06-26  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/cakephp), [cakephp/cakephp (Packagist)](https://junglewise.ai/threats/technologies/cakephp-cakephp). Vendors: [Cakephp](https://junglewise.ai/threats/vendors/cakephp), [Packagist](https://junglewise.ai/threats/vendors/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

  ```sh
  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

- [https://api.github.com/users/z3moo](https://api.github.com/users/z3moo)
- [https://github.com/z3moo](https://github.com/z3moo)
- [https://api.github.com/users/z3moo/gists%7B/gist_id%7D](https://api.github.com/users/z3moo/gists%7B/gist_id%7D)
- [https://api.github.com/users/z3moo/repos](https://api.github.com/users/z3moo/repos)
- [https://avatars.githubusercontent.com/u/143018247?v=4](https://avatars.githubusercontent.com/u/143018247?v=4)
- [https://api.github.com/users/z3moo/events%7B/privacy%7D](https://api.github.com/users/z3moo/events%7B/privacy%7D)

## Related threats

- [CakePHP SQL injection in collation handling](https://junglewise.ai/threats/cve-2026-119419-cakephp-through-5-4-3-contains-an-sql-injection-vulnerability)
- [CakePHP SQL injection in WindowExpression](https://junglewise.ai/threats/cve-2026-119418-cakephp-through-5-4-3-contains-an-sql-injection-vulnerability)
- [CakePHP improper cookie domain validation in Http Client](https://junglewise.ai/threats/cve-2026-119416-cakephp-through-5-4-3-contains-an-improper-cookie-domain)
- [CakePHP CakeResponse download method header injection and XSS](https://junglewise.ai/threats/cve-2026-106512-the-cakeresponse-download-method-in-lib-cake-network)
- [CakePHP FunctionsBuilder SQL injection in multiple methods](https://junglewise.ai/threats/cve-2026-79752-cakephp-functionsbuilder-sql-injection-in-multiple-methods)
