GHSA-hxc4-wvjf-r59p: File validation bypass via empty input field colliding with an upload in Request::all()
- Published:
- Fetched:
- Updated:
- Affects:
- laravel laravel/framework
https://github.com/laravel/framework/security/advisories/GHSA-hxc4-wvjf-r59p ↗
File validation bypass via empty input field colliding with an upload in Request::all() ### Impact In Laravel 13.x, `Request::all()` let a text input with the same name as an uploaded file take precedence over the file. If an attacker submitted an empty value alongside the file, request validation (including `FormRequest` validation) saw the empty value instead of the upload. Rules such as `nullable`, `image`, `mimes` and `max` were then skipped. Applications that validate an optional upload this way and then read it with `$request->file()` or `$request->hasFile()` could therefore store files that bypassed type and size validation. ### Patches Empty input values (`null`, empty string or empty array) no longer shadow a colliding uploaded file in `Request::all()`. This is fixed in laravel/framework 13.x by https://github.com/laravel/framework/pull/62521 and released in v13.43.0. Affected packages: composer:laravel/framework Patched: laravel/framework >=13.43.0, laravel/framework >=12.73.0