Skip to content

SQL Server LIMIT / OFFSET SQL Injection in laravel/framework and illuminate/database

High severity GitHub Reviewed Published Apr 28, 2021 in laravel/framework • Updated Jan 9, 2023

Package

composer illuminate/database (Composer)

Affected versions

>= 8.0.0, < 8.40.0
< 6.20.26

Patched versions

8.40.0
6.20.26
composer laravel/framework (Composer)
>= 8.0.0, < 8.40.0
< 6.20.26
8.40.0
6.20.26

Description

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.

References

@taylorotwell taylorotwell published to laravel/framework Apr 28, 2021
Reviewed Apr 28, 2021
Published to the GitHub Advisory Database Apr 29, 2021
Last updated Jan 9, 2023

Severity

High

Weaknesses

CVE ID

No known CVE

GHSA ID

GHSA-4mg9-vhxq-vm7j

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.