CVE-2021-21263Laravel
Medium 5.3 No auth needed
Follow: this CVE · Laravel · Laravel We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- 1.6% probability of exploitation in 30 days · percentile 77
- Auth required
- No
- Published
- Jan 19, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
What happens
Laravel is a web application framework. Versions of Laravel before 6.20.11, 7.30.2 and 8.22.1 contain a query binding exploitation. This same exploit applies to the illuminate/database package which is used by Laravel. If a request is crafted where a field that is normally a non-array value is an array, and that input is not validated or cast to its expected type before being passed to the query builder, an unexpected number of query bindings can be added to the query. In some situations, this will simply lead to no results being returned by the query builder; however, it is possible certain queries could be affected in a way that causes the query to return unexpected results.
What to do
- Apply the vendor's security update for Laravel.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | illuminate/database |
≥ 7.0.0 < 7.30.3 |
7.30.3 |
composer require "illuminate/database:^7.30.3" |
| Packagist | illuminate/database |
≥ 8.0.0 < 8.22.1 |
8.22.1 |
composer require "illuminate/database:^8.22.1" |
| Packagist | illuminate/database |
≥ 6.0.0 < 6.20.12 |
6.20.12 |
composer require "illuminate/database:^6.20.12" |
| Packagist | laravel/framework |
≥ 8.0.0 < 8.22.1 |
8.22.1 |
composer require "laravel/framework:^8.22.1" |
| Packagist | laravel/framework |
≥ 6.0.0 < 6.20.11 |
6.20.11 |
composer require "laravel/framework:^6.20.11" |
| Packagist | laravel/framework |
≥ 7.0.0 < 7.30.2 |
7.30.2 |
composer require "laravel/framework:^7.30.2" |
Per OSV / GitHub Advisories (GHSA-3p32-j457-pg5x). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| laravel | laravel | ≥ 6.0.0 < 6.20.11 |
| laravel | laravel | ≥ 7.0.0 < 7.30.2 |
| laravel | laravel | ≥ 8.0.0 < 8.22.1 |
Official sources
References
Links published by the sources. Open them with care.
- blog.laravel.com Vendor Advisory
- github.com Patch Third Party Advisory
- github.com Third Party Advisory
- packagist.org Product Third Party Advisory
- packagist.org Product Third Party Advisory