Temporary signed URL expiration bypass via unencoded numeric-keyed route parameters
Summary
Impact
When an application passes attacker-influenced, numeric-keyed parameters (for example a request's query array) to temporarySignedRoute() or signedRoute(), and those parameters do not fill a route placeholder, Laravel appended their values to the query string without URL encoding. An...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| composerlaravel/framework |
< 12.72.0→ 12.72.0 |
12.72.0 |
| composerlaravel/framework |
>= 13.0.0, < 13.41.0→ 13.41.0 |
13.41.0 |
Original description The description as published by the source.
Impact
When an application passes attacker-influenced, numeric-keyed parameters (for example a request's query array) to temporarySignedRoute() or signedRoute(), and those parameters do not fill a route placeholder, Laravel appended their values to the query string without URL encoding. An attacker can use this to add a second expires field to the signed URL. The signature covers that field, but request parsing reads it as the authoritative value, so the signed URL is treated as never expiring. Exploitation requires the application to forward such input into signed URL generation.
Patches
This issue has been patched in Laravel 12.72.0 and 13.41.0, which URL-encode numeric-keyed query parameters: https://github.com/laravel/framework/pull/62401. Users should upgrade to one of these versions or later.
Workarounds
Do not pass request-derived arrays to signed route generation. Pass only explicitly selected, string-keyed parameters.
Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV
References
- GITHUB_REPO_ADVISORY laravel/framework