The vulnerability stems from improper input validation in file upload handlers. The patch introduced dedicated request classes (ExpenseRequest, AvatarRequest, CompanyLogoRequest) with MIME type restrictions and Base64 validation. The original implementations used Illuminate\Http\Request without these safeguards, particularly vulnerable in methods handling file uploads where: 1) UploadReceiptController accepted arbitrary files without type restrictions 2) CompanyController methods lacked validation for both direct file uploads and base64-encoded content. The added Base64Mime rule in the patch confirms the absence of proper content-type verification in these functions was the root cause.