statamic/eloquent-driver is vulnerable to SQL Injection
65
Medium Risk
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.
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.
statamic/eloquent-driver is vulnerable to SQL Injection in versions 0.0.1 - 4.36.2 and 0.0.1 - 5.12.1.
Upgrade the statamic/eloquent-driver library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.