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

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2021-04-29T21:52:53.000Z
- Modified: 2024-12-02T05:40:15.245Z
- Weaknesses: CWE-89

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

(As written by GitHub Advisory Database.)

## Affected

- laravel/framework (Packagist): from 8.0.0 before 8.40.0; before 6.20.26
- illuminate/database (Packagist): from 8.0.0 before 8.40.0; before 6.20.26

## References

- <https://github.com/laravel/framework/security/advisories/GHSA-4mg9-vhxq-vm7j> (web)
- <https://github.com/laravel/framework> (package)
- <https://packagist.org/packages/illuminate/database> (web)
- <https://packagist.org/packages/laravel/framework> (web)

## Sources

- GitHub Advisory Database: [GHSA-4mg9-vhxq-vm7j](https://github.com/advisories/GHSA-4mg9-vhxq-vm7j), CC-BY-4.0, modified 2024-12-02

---

Page: https://cve.day/GHSA-4mg9-vhxq-vm7j · Whole record: https://cve.day/GHSA-4mg9-vhxq-vm7j.json · Rebuilt by cve.day 2026-11-25T22:56:31.061Z
