ash_sql is vulnerable to Information Disclosure
21
Low Risk
The AshSql.AggregateQuery.add_single_aggs/5 function rebuilds the outer query when computing aggregates over a distinct query, reconstructing it from query.from.source alone. That reconstruction discards the Ecto.Query prefix metadata where Ash stores the tenant schema for schema-based multitenancy, so the rebuilt query reads from the repository's default public schema. With sequential primary keys, aggregate values and downstream joins can match rows belonging to the wrong tenant. The fix preserves the query prefix so aggregates run against the correct tenant schema.
You are affected if you are using a version that falls within the vulnerable range and you use schema-based multitenancy with aggregates computed over distinct queries.
ash_sql is vulnerable to Information Disclosure in versions 0.0.1 - 0.7.0.
Upgrade the ash_sql 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.