CVE-2026-128360: Aggregates given a tenant are read in the enclosing query's tenant, leaking across tenants in AshSql

Published Dec 4, 2026
·
Updated

Incorrect Authorization vulnerability in ashsql allows a caller in a multitenant application to receive aggregate values computed from another tenant's rows.

An aggregate can be given a tenant with the tenant option of Ash.Query.aggregate/5. AshSql.Aggregate.Lateral.addaggregates/6 read only part of such an aggregate in that tenant. A field that is an aggregate or calculation, and what the aggregate's filter and sort refer to, were read in the tenant of the enclosing query, and with no tenant on that query they were read across every tenant. Aggregates over the same relationship were grouped into one lateral join without regard to their tenants, and with strategy(:context) multitenancy the aggregate was read in the schema of the enclosing query.

This issue affects ashsql: from 0.1.0 before 0.9.1.

Affected Software

1 affected component
hex/ash_sql>=0.1.0<0.9.1

Event History

Dec 4, 2026
CVE Published
via MITRE·06:17 AM
Data Sourced
via MITRE·06:17 AM
DescriptionWeakness

Frequently Asked Questions

1

Which versions need remediation?

AshSql versions from 0.1.0 up to, but not including, 0.9.1 are affected. Upgrade to 0.9.1 or later.

2

Which multitenant query patterns should be prioritized for review?

Prioritize uses of Ash.Query.aggregate/5 where an aggregate is assigned a tenant with the tenant option, especially when aggregate fields or calculations, or their filters and sorts, are involved. Also review aggregates over the same relationship, because they could be grouped into a lateral join without considering their tenants.

3

When is cross-tenant exposure most likely?

A caller can receive aggregate values from another tenant when aggregate-related fields, calculations, filters, or sorts are evaluated in the enclosing query's tenant rather than the aggregate's assigned tenant. If the enclosing query has no tenant, those reads can occur across every tenant.

4

Does the multitenancy strategy affect exposure?

Yes. With strategy(:context) multitenancy, the aggregate could be read in the schema of the enclosing query rather than the intended tenant context.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203