The vulnerability, GHSA-44wp-g8f4-f4v5, allowed unauthenticated temporary file uploads on authentication pages in Filament. This was due to the unconditional application of Livewire's WithFileUploads trait to Livewire components that handle schemas, including those on authentication pages like the login form where file uploads are not expected.
The WithFileUploads trait exposes the _startUpload and _finishUpload methods, which handle file uploads. On unauthenticated pages, attackers could directly call these methods to upload files to the application's temporary storage, potentially leading to disk space exhaustion or increased storage costs.
The patch addresses this by introducing a new trait, Filament\Schemas\Concerns\RestrictsFileUploadsToSchemaComponents. This trait overrides the _startUpload and _finishUpload methods to include a crucial authorization check. The new implementation verifies that any file upload request corresponds to a legitimate file upload component defined within the page's schema by calling isFileUploadForSchemaComponent(). If the check fails, the request is aborted with a 403 Forbidden status.
This new trait is then applied to all affected authentication-related page components, such as Login, Register, RequestPasswordReset, ResetPassword, EmailVerificationPrompt, and SetUpRequiredMultiFactorAuthentication, effectively closing the security loophole. The vulnerable functions are the original implementations of _startUpload and _finishUpload that lacked this validation.