Query Binding Exploitation in Laravel
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Laravel | framework | 6.0.0 to before 6.20.11; 7.0.0 to before 7.30.2; 8.0.0 to before 8.22.1 | 6.20.11, 7.30.2, 8.22.1 | Patch available | CNA |
| — | laravel/framework (Packagist) | 8.0.0 to before 8.22.1 | 8.22.1 | Patch available | GHSA-3p32-j457-pg5x |
| — | illuminate/database (Packagist) | 7.0.0 to before 7.30.3 | 7.30.3 | Patch available | GHSA-3p32-j457-pg5x |
| — | illuminate/database (Packagist) | 8.0.0 to before 8.22.1 | 8.22.1 | Patch available | GHSA-3p32-j457-pg5x |
| — | illuminate/database (Packagist) | 6.0.0 to before 6.20.12 | 6.20.12 | Patch available | GHSA-3p32-j457-pg5x |
| — | laravel/framework (Packagist) | 6.0.0 to before 6.20.11 | 6.20.11 | Patch available | GHSA-3p32-j457-pg5x |
| — | laravel/framework (Packagist) | 7.0.0 to before 7.30.2 | 7.30.2 | Patch available | GHSA-3p32-j457-pg5x |
- framework VendorLaravel Affected 6.0.0 to before 6.20.11; 7.0.0 to before 7.30.2; 8.0.0 to before 8.22.1 Fixed in 6.20.11, 7.30.2, 8.22.1 Patch available CNA
- laravel/framework (Packagist) Vendor— Affected 8.0.0 to before 8.22.1 Fixed in 8.22.1 Patch available GHSA-3p32-j457-pg5x
- illuminate/database (Packagist) Vendor— Affected 7.0.0 to before 7.30.3 Fixed in 7.30.3 Patch available GHSA-3p32-j457-pg5x
- illuminate/database (Packagist) Vendor— Affected 8.0.0 to before 8.22.1 Fixed in 8.22.1 Patch available GHSA-3p32-j457-pg5x
- illuminate/database (Packagist) Vendor— Affected 6.0.0 to before 6.20.12 Fixed in 6.20.12 Patch available GHSA-3p32-j457-pg5x
- laravel/framework (Packagist) Vendor— Affected 6.0.0 to before 6.20.11 Fixed in 6.20.11 Patch available GHSA-3p32-j457-pg5x
- laravel/framework (Packagist) Vendor— Affected 7.0.0 to before 7.30.2 Fixed in 7.30.2 Patch available GHSA-3p32-j457-pg5x
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:laravel:laravel:*:*:*:*:*:*:*:* | 6.0.0 to before 6.20.11; 7.0.0 to before 7.30.2; 8.0.0 to before 8.22.1 | Vulnerable | Laravel |
- cpe:2.3:a:laravel:laravel:*:*:*:*:*:*:*:* Versions 6.0.0 to before 6.20.11; 7.0.0 to before 7.30.2; 8.0.0 to before 8.22.1 Vulnerable ·Laravel
Remediation
- Fix · CNA framework (laravel) Fixed in 6.20.11, 7.30.2, 8.22.1
- Fix · GHSA-3p32-j457-pg5x laravel/framework (Packagist) Fixed in 8.22.1 Advisory →
- Fix · GHSA-3p32-j457-pg5x illuminate/database (Packagist) Fixed in 7.30.3 Advisory →
- Fix · GHSA-3p32-j457-pg5x illuminate/database (Packagist) Fixed in 8.22.1 Advisory →
- Fix · GHSA-3p32-j457-pg5x illuminate/database (Packagist) Fixed in 6.20.12 Advisory →
- Fix · GHSA-3p32-j457-pg5x laravel/framework (Packagist) Fixed in 6.20.11 Advisory →
- Fix · GHSA-3p32-j457-pg5x laravel/framework (Packagist) Fixed in 7.30.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-21263
- 2026-10-03 Alias added: GHSA-3p32-j457-pg5x
References
Advisory 5
More Laravel vulnerabilities
- TI-2018-10827 In Laravel Framework through 5.5.40 and 5.6.x through 5.6.29, remote code execution might… KEVCVSS 3.1HIGH 8.1
- TI-2021-09454 A deserialization vulnerability in the destruct() function of Laravel v8.5.9 allows… CVSS 3.1CRITICAL 9.8
- TI-2022-02662 laravel deserialization CVSS 3.1CRITICAL 9.8
- TI-2017-12436 In Laravel framework through 5.5.21, remote attackers can obtain sensitive information… CVSS 3.0HIGH 7.5
- TI-2022-02676 Laravel deserialization CVSS 3.1HIGH 8.8
- TI-2020-15251 An issue was discovered in Laravel before 6.18.35 and 7.x before 7.24.0. CVSS 3.1HIGH 7.5
Sources
- CVE-2021-21263 · CVE Program
- CVE-2021-21263 · NVD
- FIRST EPSS
- GHSA-3p32-j457-pg5x · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences