# GHSA-wq8p-mqvg-2p5h: laravel framework SQL Injection via limit and offset functions

- Severity: High (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-05-15T22:20:42.000Z
- Modified: 2024-11-29T05:41:40.570Z
- 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 6.0.0 before 6.20.26; from 7.0.0 before 7.30.5; from 8.0.0 before 8.40.0

## References

- <https://github.com/laravel/framework/security/advisories/GHSA-4mg9-vhxq-vm7j> (web)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/laravel/framework/2021-04-28.yaml> (web)
- <https://github.com/laravel/framework> (package)

## Sources

- GitHub Advisory Database: [GHSA-wq8p-mqvg-2p5h](https://github.com/advisories/GHSA-wq8p-mqvg-2p5h), CC-BY-4.0, modified 2024-11-29

---

Page: https://cve.day/GHSA-wq8p-mqvg-2p5h · Whole record: https://cve.day/GHSA-wq8p-mqvg-2p5h.json · Rebuilt by cve.day 2026-11-25T22:56:33.274Z
