SQL Server LIMIT / OFFSET SQL Injection in laravel/framework and illuminate/database
Impact
Those using SQL Server with Laravel and allowing user input to be passed directly to the limit and offset functions are vulnerable to SQL injection. Other database drivers such as MySQL and Postgres are not affected by this vulnerability.
Patches
This problem has been patched on Laravel versions 6.20.26, 7.30.5, and 8.40.0.
Workarounds
You may workaround this vulnerability by ensuring that only integers are passed to the limit and offset functions, as well as the skip and take functions.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | illuminate/database | >= 8.0.0, < 8.40.0, < 6.20.26 | 8.40.0, 6.20.26 |
| Composer package | laravel/framework | >= 8.0.0, < 8.40.0, < 6.20.26 | 8.40.0, 6.20.26 |
References
- Weakness (CWE)
CWE-89- Platform
- Composer
- Package
illuminate/database, laravel/framework- Disclosed
- 29.04.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-4mg9-vhxq-vm7j - CC BY 4.0
Vulnerability history: laravel/framework
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
- 26
- First → latest
- 01.2021 09.2026
- Without a fix
- 0
- Exploited in attacks
- 1
Severity breakdown
- Critical 2
- High 11
- Medium 12
- Low 1
Disclosures per year
- 2021: 5
- 2022: 5
- 2023: 0
- 2024: 10
- 2025: 3
- 2026: 3
-
SQL Server LIMIT / OFFSET SQL Injection in laravel/framework and illuminate/database this entry
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.