Intel

AIKIDO-2026-620626

statamic/eloquent-driver is vulnerable to SQL Injection

SQL InjectionGHSA-5qmf-5xc3-j94f Published 6 days ago

65

Medium Risk

This Affects:

PHPstatamic/eloquent-driver
0.0.1 - 4.36.2
Fixed in 4.36.3
0.0.1 - 5.12.1
Fixed in 5.12.2
Are you affected? Scan for Free

TL;DR

The QueriesJsonColumns trait builds the SQL ORDER BY clause for JSON cast entry and asset fields using a caller supplied sort direction without validating it. An authenticated Control Panel user with access to a collection or asset container can pass a direction such as asc, (select 1) to inject SQL into the ordering clause and read arbitrary database data, including user records and password hashes. The fix adds an allowlist that only accepts asc or desc and throws an exception for anything else.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range, and you allow authenticated Control Panel users to sort entries or assets by a number or date field.

Background info

statamic/eloquent-driver is vulnerable to SQL Injection in versions 0.0.1 - 4.36.2 and 0.0.1 - 5.12.1.

How to fix this

Upgrade the statamic/eloquent-driver library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform