CVE-2021-21263: Query Binding Exploitation in Laravel
Description
Laravel versions <6.20.12, <7.30.3 & <8.22.1 contain a query binding exploitation.
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.
This vulnerability was discovered by Tim Groenevelt (tim.g@foodbyus.com).
References
- https://github.com/laravel/framework/pull/35865
Other sources
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.
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is CVE-2021-21263?
CVE-2021-21263 is a vulnerability in Laravel web application framework versions before 6.20.11, 7.30.2, and 8.22.1, as well as the illuminate/database package.
What is the severity of CVE-2021-21263?
The severity of CVE-2021-21263 is high with a CVSS score of 5.3.
How does CVE-2021-21263 affect Laravel?
CVE-2021-21263 allows for query binding exploitation in Laravel, potentially leading to unauthorized access or data manipulation.
How can I fix CVE-2021-21263?
To fix CVE-2021-21263, upgrade Laravel to version 6.20.11, 7.30.2, or 8.22.1, or update the illuminate/database package accordingly.
Where can I find more information on CVE-2021-21263?
More information on CVE-2021-21263 can be found in the Laravel security advisories and GitHub pull request.