Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql
Severity and exploitation
KEV coverage does not rule out exploitation.
Assessment vector
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NAssessment vector
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NSeverity
low2.1CVSS measures technical severity, not the likelihood of an attack.
Known exploitation
Not listed in the checked CISA KEV catalog
Absence from CISA KEV does not rule out attacks.
Public exploit
Exploit reference published
Source-linked evidence; not proof of attacks in the wild or independent validation.
Remediation
Package fixes recorded
Fix versions are recorded for 1 of 1 mapped packages. Check each release branch and any separate product guidance.
What this means
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.
Source excerpt · OSVAttack conditions
No attack-condition excerpt has been identified here. Review the full source description and references for authentication, network access, and configuration requirements.
Review supporting sources →Affected versions
Check the exact model, release, and any platform requirements against your installation.
ash-project · EEF
ash_sql
1 range
ash-project · EEF
ash_sql
Package identity
pkg:hex/ash_sqlExplore ash_sql →Identity supplied by EEF. Version matching requires compatible range evidence.
Compare with this publisher’s ranges. This does not inspect your installation.
affected
0.1.0 → before 0.7.1
semver versions
Other versions: unaffected
Product identifiers (CPE)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*ash-project · EEF
ash_sql
1 range
ash-project · EEF
ash_sql
Package identity
pkg:github/ash-project/ash_sqlIdentity supplied by EEF. Version matching requires compatible range evidence.
Compare with this publisher’s ranges. This does not inspect your installation.
affected
dd092ed273dec7bd2194352f24a39229fc8ae68b → before 3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889
git versions
Other versions: unaffected
Product identifiers (CPE)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*Packages
Compare each installed version with the publisher’s affected ranges. Where a fix is recorded, choose the appropriate release branch and test compatibility before upgrading.
| Affected range | Recorded fix |
|---|---|
| From 0.1.0 before 0.7.1Semantic versions | 0.7.1 |
Version evidence: OSV · EEF-CVE-2026-81318
View original version evidence (157 explicit versions)
Source version evidence
This source records affected versions without identifying a package ecosystem and name. This evidence is not used for package matching.
What to do
Compare your installed product and version with the affected versions above. A matching product name alone does not confirm exposure.
Use the recorded fix for your release branch. Review the publisher’s instructions and test compatibility before upgrading.
cve.new guidance unless attributed to a publisher. This page does not inspect your installation.
Public exploit evidence
The sources identify public exploit references. We have not independently tested them; their availability does not establish exploitation in the wild.
ash-project/ash_sql · security/advisories/GHSA-ww8j-58rc-f8h3 ↗Attributed to CISA-ADPOriginal source description
Read the full publisher description
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).
References
6 sourcesInside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-81318View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Environment requirements
These conditions apply together as specified by the publisher. A matching product name alone does not establish exposure.
EEF · platform conditions
All conditions must hold
Any condition may hold
Vulnerable product
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*From (inclusive): 0.1.0
Before: 0.7.1
Applicability preview
[
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*",
"versionEndExcluding": "0.7.1",
"versionStartIncluding": "0.1.0",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
]Contributing organizations · 2
Assigning organization
Additional data publisher
Timeline
All times UTCAdvisory published
Publication date supplied by the source.
Source updated
Latest modification date supplied by the source.
Last imported by cve.new
Latest catalog import, not the date we first saw this advisory.
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.
Related advisories
Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.
exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql
Incorrect Authorization vulnerability in ash-project ash_sql allows a caller to bypass a scoping or authorization filter expressed as exists/2 over a relationship that declares both a limit (or from_many?) and a parent(...)-referencing filter or sort.
Recorded fixes — ash_sql: 0.7.1. Check your release branch.
Public exploit reference
Same-named aggregates with differing filters are conflated in AshSql
Incorrect Authorization vulnerability in ash-project ash_sql allows a caller to receive an aggregate value computed over rows a more restrictive filter should have excluded, disclosing counts, sums, or lists across an authorization or tenancy boundary.
Recorded fixes — ash_sql: 0.7.1. Check your release branch.
Public exploit reference
Unescaped backslash allows LIKE wildcard injection in AshSql string search
Improper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash_sql allows a user who supplies a search term to contains/2, string_starts_with/2, or string_ends_with/2 to inject live SQL LIKE wildcards, turning a literal substring search into an attacker-controlled pattern match.
Recorded fixes — ash_sql: 0.7.1. Check your release branch.
Public exploit reference
SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql
Incorrect Comparison vulnerability in ash-project ash_sql allows a user to pad a string field with tab, newline, carriage-return, or form-feed characters and pass a trimmed uniqueness or equality check in the database that the same expression would fail in memory (or the reverse).
Recorded fixes — ash_sql: 0.7.1. Check your release branch.
Public exploit reference