cve.bz

CVE-2021-21263 laravel laravel: SQL Injection

5.3 mediumEPSS 1.6%Fix available

Medium (5.3) in laravel laravel. EPSS 1.6% estimated probability of exploitation activity in the next 30 days. Fixed in laravel/framework 6.20.11, 7.30.2, 8.22.1.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS
1.6% (unchanged from 1.6% a week ago; 1.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 77th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-21263 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21263?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21263?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-21263 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
laravel:laravelfrom 6.0.0 before 6.20.11
laravel:laravelfrom 7.0.0 before 7.30.2
laravel:laravelfrom 8.0.0 before 8.22.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-3p32-j457-pg5xPackagistlaravel/framework>=8.0.0 <8.22.18.22.1
GHSA-3p32-j457-pg5xPackagistilluminate/database>=7.0.0 <7.30.37.30.3
GHSA-3p32-j457-pg5xPackagistilluminate/database>=8.0.0 <8.22.18.22.1
GHSA-3p32-j457-pg5xPackagistilluminate/database>=6.0.0 <6.20.126.20.12
GHSA-3p32-j457-pg5xPackagistlaravel/framework>=6.0.0 <6.20.116.20.11
GHSA-3p32-j457-pg5xPackagistlaravel/framework>=7.0.0 <7.30.27.30.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14php-laravel-framework6.20.11+dfsg-1DEBIAN-CVE-2021-21263

From the distributions' data via OSV.dev: the Debian Security Tracker. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON