The vulnerability description explicitly points to the findPreview function in src/Controller/MailPreviewController.php as the location where the previewName value is accepted and passed to constructor execution. The provided commit information for both versions (4.x and 5.x) clearly shows the patches applied to this specific function. The patches introduce two key security checks:
- A check to reject
previewName values containing namespace separators (\). This directly addresses the 'without rejecting namespace separators' part of the vulnerability.
- A check using
is_subclass_of to ensure that the resolved class extends DebugKit\Mailer\MailPreview. This addresses the 'without verifying that the class extends DebugKit\Mailer\MailPreview' part.
These changes confirm that the MailPreviewController::findPreview function, in its state prior to these patches, was the direct point of vulnerability, allowing for unsafe reflection and arbitrary constructor execution due to insufficient input validation and type checking. An attacker would trigger this vulnerability by crafting a malicious previewName that would be processed by this function.