Query Binding Exploitation
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
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | illuminate/database | >= 7.0.0, < 7.30.3, >= 8.0.0, < 8.22.1, >= 6.0.0, < 6.20.12 | 7.30.3, 8.22.1, 6.20.12 |
| Composer package | laravel/framework | >= 8.0.0, < 8.22.1, >= 6.0.0, < 6.20.11, >= 7.0.0, < 7.30.2 | 8.22.1, 6.20.11, 7.30.2 |
References
- https://github.com/laravel/framework/security/advisories/GHSA-3p32-j457-pg5x
- https://nvd.nist.gov/vuln/detail/CVE-2021-21263
- https://github.com/laravel/framework/pull/35865
- https://blog.laravel.com/security-laravel-62011-7302-8221-released
- https://blog.laravel.com/security-laravel-62012-7303-released
- https://github.com/FriendsOfPHP/security-advisories/blob/master/illuminate/database/CVE-2021-21263.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/CVE-2021-21263.yaml
- https://packagist.org/packages/illuminate/database
- https://packagist.org/packages/laravel/framework
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-74, CWE-89- Platform
- Composer
- Package
illuminate/database, laravel/framework- Disclosed
- 19.01.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-3p32-j457-pg5x - CC BY 4.0
Vulnerability history: illuminate/database
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 5
- First → latest
- 01.2021 05.2024
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 4
- Medium 1
Disclosures per year
- 2021: 3
- 2022: 1
- 2023: 0
- 2024: 1
- 2025: 0
- 2026: 0
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.