Vulnerability advisory

GHSA-wq8p-mqvg-2p5h

laravel framework SQL Injection via limit and offset functions

Published Updated OSV record ↗
Severity

Severity not reported.

Affected versions

AffectedFixed in
6.0.0 to before 6.20.266.20.26Advisories →
Also listed as affected (103)
7.0.0 to before 7.30.57.30.5Advisories →
Also listed as affected (78)
8.0.0 to before 8.40.08.40.0Advisories →
Also listed as affected (65)

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

  • Codex
  • Claude Code
  • VS Code
  • GitHub Copilot
  • Cursor
  • Cline
  • Windsurf
  • Google Anti-gravity
  • OpenCode
  • Pi
  • Gemini CLI
  • Hermes Agent
  • Zed
  • Junie
  • Qwen Code
  • Kiro
  • Kilo Code
  • Factory Droid

Set up GitHits for your agents

Run this command:

<> bash
npx githits@latest init

What happens next:

  1. Opens your browser to authorize GitHits
  2. Asks whether to set up GitHits at the user or project level
  3. Detects your supported AI coding tools
  4. Lets you choose which tools to configure
  5. Configures the selected tools