CVE-2026-48820
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 · uneditedCakePHP 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 confidenceCakePHP'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.
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 checksWork through these to decide whether this CVE applies to you.
-
Identify CakePHP installationLook 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.
-
Determine installed CakePHP versionRun '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.
-
Verify element rendering is in useSearch 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.
-
Inspect _getElementFileName for path validationExamine 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.
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 · scopedUpgrade 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.
CakePHP 5.3.6 (or 5.2.13/5.1.7/4.6.4/4.5.11 depending on your branch)
- Identify the currently installed CakePHP version by checking your composer.json or vendor/cakephp/cakephp/composer.json
- 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
- Run `composer update` to apply the version change
- Test your application thoroughly, specifically focusing on any custom element usage or plugins that render view elements
- Verify the fix by confirming that element file resolution is now restricted to application/plugin view template paths
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing3.0 h
- Review / QA2.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-48820 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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