Incorrect Authorization vulnerability in ash-project ashsql allows a caller in a schema-based multitenant application to receive aggregate…
CVE-2026-81318
Incorrect Authorization vulnerability in ash-project ashsql 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.addsingleaggs/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 ashsql: from 0.1.0 before 0.7.1.
Assessment
- CVSS
- 2.1 (v4.0)
- Severity
- Low
- EPSS
- 0.17% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 30 August 2026
- Last updated
- 19 November 2026
- Affected
- ash-project · ash_sql
- Assigner
- EEF
CVSS vectorCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
At the source
References
- https://github.com/ash-project/ash_sql/security/advisories/GHSA-ww8j-58rc-f8h3
- https://cna.erlef.org/cves/CVE-2026-81318.html
- https://osv.dev/vulnerability/EEF-CVE-2026-81318
- https://github.com/ash-project/ash_sql/commit/dd092ed273dec7bd2194352f24a39229fc8ae68b
- https://github.com/ash-project/ash_sql/commit/3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-81318