statamic/eloquent-driver is vulnerable to SQL Injection
65
CVE Score
Medium
SQL Injection
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.
Upgrade the statamic/eloquent-driver library to the patch version.
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.
0.0.1 - 4.36.2
Fixed in 4.36.30.0.1 - 5.12.1
Fixed in 5.12.2statamic/eloquent-driver is vulnerable to SQL Injection in versions 0.0.1 - 4.36.2 and 0.0.1 - 5.12.1.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
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.