Vulnerability EEF-CVE-2026-81318

Unknown
UNKNOWN RISK
Vulnerabilities without an assigned CVSS score. Severity is not determinable from available data.
2 months ago
August 30, 2026 at 11:56 AM UTC
Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql
0.1.1-rc.0 and 0.1.1-rc.1 and 0.1.1-rc.2 and 0.1.1-rc.3 and 0.1.1-rc.4 and 0.1.1-rc.5 and 0.1.1-rc.6 and 0.1.1-rc.7 and 0.1.1-rc.8 and 0.1.1-rc.9 and 0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0
0.1.1-rc.0 and 0.1.1-rc.1 and 0.1.1-rc.2 and 0.1.1-rc.3 and 0.1.1-rc.4 and 0.1.1-rc.5 and 0.1.1-rc.6 and 0.1.1-rc.7 and 0.1.1-rc.8 and 0.1.1-rc.9 and 0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0

Summary

Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql

Details

Summary

Incorrect Authorization vulnerability in ash-project ash_sql allows a caller in a schema-based multitenant application to receive aggregate values computed from another tenant's rows.

When an aggregate is computed over a distinct query, AshSql.AggregateQuery.add_single_aggs/5 rebuilds the outer query from query.from.source alone, which is only the {table, schema} tuple and does not carry query.prefix or query.from.prefix. For strategy(:context) multitenancy those hold the tenant schema, so the rebuilt outer query reads the repo's default schema while the inner correlated subquery still reads the tenant schema, and the two are joined only on primary key. The aggregate, and any relationship join added off the prefix-less binding, is then computed against the wrong tenant's rows. The neighbouring limit and exists branches instead wrap the query with subquery/1, which preserves the prefix.

This issue affects ash_sql: from 0.1.0 before 0.7.1.

Configurations

An application must use AshPostgres schema-based (strategy(:context)) multitenancy and compute an aggregate over a distinct query (for example an aggregate whose query filters across a to-many relationship).

Related Vulnerabilities

Other vulnerabilities affecting the same packages

Unknown
2 months ago
exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql
0.4.1 - 0.7.0 EEF-CVE-2026-77454
0.4.1 - 0.7.0 EEF-CVE-2026-77454
Unknown
2 months ago
Same-named aggregates with differing filters are conflated in AshSql
0.1.1-rc.0 and 0.1.1-rc.1 and 0.1.1-rc.2 and 0.1.1-rc.3 and 0.1.1-rc.4 and 0.1.1-rc.5 and 0.1.1-rc.6 and 0.1.1-rc.7 and 0.1.1-rc.8 and 0.1.1-rc.9 and 0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0 EEF-CVE-2026-81316
0.1.1-rc.0 and 0.1.1-rc.1 and 0.1.1-rc.2 and 0.1.1-rc.3 and 0.1.1-rc.4 and 0.1.1-rc.5 and 0.1.1-rc.6 and 0.1.1-rc.7 and 0.1.1-rc.8 and 0.1.1-rc.9 and 0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0 EEF-CVE-2026-81316
Unknown
2 months ago
Unescaped backslash allows LIKE wildcard injection in AshSql string search
0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0 EEF-CVE-2026-78691
0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0 EEF-CVE-2026-78691
Unknown
2 months ago
SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql
0.1.1-rc.0 and 0.1.1-rc.1 and 0.1.1-rc.2 and 0.1.1-rc.3 and 0.1.1-rc.4 and 0.1.1-rc.5 and 0.1.1-rc.6 and 0.1.1-rc.7 and 0.1.1-rc.8 and 0.1.1-rc.9 and 0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0 EEF-CVE-2026-80227
0.1.1-rc.0 and 0.1.1-rc.1 and 0.1.1-rc.2 and 0.1.1-rc.3 and 0.1.1-rc.4 and 0.1.1-rc.5 and 0.1.1-rc.6 and 0.1.1-rc.7 and 0.1.1-rc.8 and 0.1.1-rc.9 and 0.1.1-rc.10 and 0.1.1-rc.11 and 0.1.1-rc.12 and 0.1.1-rc.13 and 0.1.1-rc.14 and 0.1.1-rc.15 and 0.1.1-rc.16 and 0.1.1-rc.17 and 0.1.1-rc.18 and 0.1.1-rc.19 and 0.1.1-rc.20 - 0.7.0 EEF-CVE-2026-80227
View all vulnerabilities for these packages

Impacted packages

Timeline

Published
2 months ago
August 30, 2026 at 11:56 AM UTC
Fixed (0.7.1)
2 months ago
August 30, 2026 at 05:54 AM UTC
Last Modified
1 day ago
November 20, 2026 at 05:23 PM UTC