Home/Research/Post

GHSA-hxc4-wvjf-r59p: Laravel: File validation bypass via empty input field colliding with an upload in Request::all()

  • Severity: MEDIUM
  • CVE: CVE-2026-142641
  • Ecosystems: composer, composer
  • Packages: laravel/framework, laravel/framework

### 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.

Source: GitHub Security Advisories · 2026-12-03