Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. illuminate/database
  4. ›
  5. GMS-2021-113

GMS-2021-113: SQL Server LIMIT / OFFSET SQL Injection in laravel/framework and illuminate/database

April 29, 2021 (updated November 18, 2021)

Impact

Those using SQL Server with Laravel and allowing user input to be passed directly to the limit and offset functions is 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

  • github.com/advisories/GHSA-4mg9-vhxq-vm7j
  • github.com/laravel/framework/security/advisories/GHSA-4mg9-vhxq-vm7j
  • packagist.org/packages/illuminate/database
  • packagist.org/packages/laravel/framework

Code Behaviors & Features

Detect and mitigate GMS-2021-113 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 6.20.26, all versions starting from 8.0.0 before 8.40.0

Fixed versions

  • 6.20.26
  • 8.40.0

Solution

Upgrade to versions 6.20.26, 8.40.0 or above.

Source file

packagist/illuminate/database/GMS-2021-113.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:33 +0000.