GitHub Advisoryadvisory · Packagist

GHSA-4mg9-vhxq-vm7j SQL Server LIMIT / OFFSET SQL Injection in laravel/framework and illuminate/database

HIGH Published 2021-04-29 Modified 2021-11-18 Official page ↗
Ecosystem
Packagist
Packages
laravel/framework, illuminate/database
Severity
High
Weaknesses
CWE-89
Reviewed
2021-04-28

Affected packages

• Packagist laravel/framework: >= 8.0.0, < 8.40.0 → fixed in 8.40.0 • Packagist laravel/framework: < 6.20.26 → fixed in 6.20.26 • Packagist illuminate/database: >= 8.0.0, < 8.40.0 → fixed in 8.40.0 • Packagist illuminate/database: < 6.20.26 → fixed in 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.

Related

Weakness · CWE (1)

  • CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness

References