# CVE-2026-54614: DebugKit: MailPreview contains unsafe reflection

> Attackers with local or allowlisted access can trigger arbitrary constructor execution via unsafe reflection in DebugKit's MailPreview feature, leading to code execution and data disclosure.

- **Severity:** Medium 4.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Aug 2026
- **Updated:** 29 Aug 2026
- **Also known as:** GHSA-p46m-g734-vpc4

## What is CVE-2026-54614?

CVE-2026-54614 is a medium-severity code injection vulnerability in cakephp debug_kit, published on 26 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

DebugKit provides a debugging toolbar for CakePHP applications. Prior to 4.10.3 and 5.2.4, the DebugKit MailPreview feature in src/Controller/MailPreviewController.php accepts a route-controlled previewName value in findPreview and passes the resolved class from App::className() to constructor execution without rejecting namespace separators or verifying that the class extends DebugKit\Mailer\MailPreview. An attacker able to access DebugKit while debug mode is enabled and the request hostname is local or allowlisted can select an unintended application class through the mail-preview preview route, resulting in arbitrary constructor execution and limited disclosure of application information. This issue is fixed in versions 4.10.3 and 5.2.4.

Weakness: CWE-470 (Use of Externally-Controlled Input to Select Classes or Code)

## Which versions are affected by CVE-2026-54614?

4 open source packages ship an affected version, including cakephp/debug_kit.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cakephp/debug_kit` | Packagist | All versions | 4.10.3 |
| `cakephp/debug_kit` | Packagist | All versions | 4.10.3 |
| `cakephp/debug_kit` | Packagist | From 5.0.0 | 5.2.4 |
| `cakephp/debug_kit` | Packagist | From 5.0.0 | 5.2.4 |

## How do I fix CVE-2026-54614?

Upgrade cakephp/debug_kit to a fixed version for your release line: 4.10.3 or 5.2.4.

## Is CVE-2026-54614 being exploited?

There is no known exploitation of CVE-2026-54614 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-54614 and fix it if it is affected.

What it is: CVE-2026-54614 is a medium-severity code injection vulnerability in cakephp debug_kit, published on 26 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-54614 in the wild and no public exploit code.

Affected packages and fixed versions:
- cakephp/debug_kit (Packagist): affected all versions; fixed in 4.10.3
- cakephp/debug_kit (Packagist): affected all versions; fixed in 4.10.3
- cakephp/debug_kit (Packagist): affected from 5.0.0; fixed in 5.2.4
- cakephp/debug_kit (Packagist): affected from 5.0.0; fixed in 5.2.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-54614/ (Markdown: https://insights.sbomify.com/CVE-2026-54614/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-54614
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-54614
- OSV: https://osv.dev/vulnerability/CVE-2026-54614

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-54614/
Summaries are generated and may contain mistakes; the official description above is the record.
