Path TraversalWeakness · CWE-22

CVE-2026-48820

MEDIUM · 6.3 CVSS v4.0 Published 2026-06-17
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
72/100
Remediation priority · Elevated
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

CakePHP's View::_getElementFileName() method fails to validate that resolved element paths stay within allowed application/plugin view template directories. This allows path traversal via crafted element names (e.g., using ../../ sequences) to include arbitrary PHP files on the server, resulting in potential local file inclusion.

MitigationUpgrade CakePHP to patched versions (5.3.6, 5.2.13, 5.1.7, 4.6.4, or 4.5.11). If immediate patching is not feasible, implement strict input validation on element name parameters to reject path traversal sequences.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
None
Authentication
X
User interaction
None
Scope
X

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify CakePHP installation
    Look for CakePHP-specific files: check for composer.json with 'cakephp/cakephp' in require, or presence of vendor/cakephp/cakephp directory, or App/Application.php file.
    Affected if CakePHP is present in the application.
  2. Determine installed CakePHP version
    Run 'composer show cakephp/cakephp' or inspect the version field in composer.json under require/aliases for cakephp/cakephp. Alternatively, check vendor/cakephp/cakephp/src/View.php for version constants.
    Affected if Installed version is earlier than 5.3.6, 5.2.13, 5.1.7, 4.6.4, or 4.5.11.
  3. Verify element rendering is in use
    Search codebase for element() calls: grep -r '->element(' or '$this->element(' in src/ or templates/ directories, or look for $this->request->getParam('element') patterns.
    Affected if The application uses element rendering which calls the vulnerable _getElementFileName method.
  4. Inspect _getElementFileName for path validation
    Examine vendor/cakephp/cakephp/src/View.php in the _getElementFileName method. Look for realpath() calls with directory boundary checks, or path traversal sequence validation (checking for ../ patterns).
    Affected if The method lacks realpath() boundary validation or explicit path traversal filtering on the element name parameter.

A user is affected if CakePHP is installed with a version before the patched releases AND the application uses element rendering with user-influenced element name parameters.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade CakePHP to patched versions (5.3.6, 5.2.13, 5.1.7, 4.6.4, or 4.5.11). If immediate patching is not feasible, implement strict input validation on element name parameters to reject path traversal sequences.

Recommended fix High confidence

CakePHP 5.3.6 (or 5.2.13/5.1.7/4.6.4/4.5.11 depending on your branch)

  1. Identify the currently installed CakePHP version by checking your composer.json or vendor/cakephp/cakephp/composer.json
  2. Upgrade to the patched version corresponding to your current branch: For CakePHP 5.3.x, upgrade to 5.3.6; For CakePHP 5.2.x, upgrade to 5.2.13; For CakePHP 5.1.x, upgrade to 5.1.7; For CakePHP 4.6.x, upgrade to 4.6.4; For CakePHP 4.5.x, upgrade to 4.5.11
  3. Run `composer update` to apply the version change
  4. Test your application thoroughly, specifically focusing on any custom element usage or plugins that render view elements
  5. Verify the fix by confirming that element file resolution is now restricted to application/plugin view template paths
Caveat Standard CakePHP minor/patch upgrades typically have minimal breaking changes; review the CHANGELOG for your version jump for any deprecation notices

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-48820 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-48820 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data