CVE-2026-54614: Unsafe Reflection and Arbitrary Class Instantiation in cakephp/debug_kit MailPreview
Vulnerability ID: CVE-2026-54614
CVSS Score: 4.3
Published: 2026-08-26
CVE-2026-54614 is an unsafe reflection vulnerability in the MailPreview component of cakephp/debug_kit prior to versions 4.10.3 and 5.2.4. Unauthenticated or low-privileged remote attackers can exploit this vulnerability to dynamically resolve and instantiate arbitrary PHP classes within the Composer autoloader environment, leading to constructor and destructor execution.
TL;DR
An unsafe reflection flaw in CakePHP's DebugKit toolbar allows remote attackers to instantiate arbitrary PHP classes, potentially triggering remote code execution, database interactions, or denial of service through destructor/constructor side-effects.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-470
- Attack Vector: Network
- CVSS v3.1: 4.3 (Medium)
- Exploit Status: poc
- KEV Status: Not Listed
- Impact: Unsafe Reflection / Arbitrary Class Instantiation / Potential Remote Code Execution
Affected Systems
- Applications utilizing CakePHP Framework with the DebugKit plugin enabled
-
debug_kit: < 4.10.3 (Fixed in:
4.10.3) -
debug_kit: >= 5.0.0, < 5.2.4 (Fixed in:
5.2.4)
Code Analysis
Commit: c8a2a9e
Fix unsafe reflection in MailPreviewController (5.x)
Commit: 7c4d85e
Backport MailPreview reflection security fixes to 4.x branch
Exploit Details
- GitHub: Exploit concepts and validation test cases within the official security pull request
Mitigation Strategies
- Upgrade cakephp/debug_kit to version 4.10.3 or 5.2.4.
- Enforce development environment isolation by executing composer installations with the --no-dev flag in production.
- Ensure CakePHP debug mode is explicitly set to false in all public environments.
- Deploy Web Application Firewall (WAF) rules to detect and drop requests containing directory separators or namespace backslashes inside DebugKit URI paths.
Remediation Steps:
- Run 'composer update cakephp/debug_kit' to fetch the secure versions.
- Validate that the installed version in composer.lock is at least 4.10.3 or 5.2.4.
- Verify production environments have 'debug' configuration set to false.
- Configure web servers to reject requests containing backslash (%5C) sequences pointing to DebugKit paths.
References
- GHSA-p46m-g734-vpc4: cakephp/debug_kit Unsafe Reflection Vulnerability
- CakePHP DebugKit 4.10.3 Release Notes
- CakePHP DebugKit 5.2.4 Release Notes
Read the full report for CVE-2026-54614 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)