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: 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
-
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.