Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

Skip to content
Check your stack
CVE-2026-81318

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

Products / packages ash-project ash_sql · ash_sql

Published

Share

Severity and exploitation

Not in CISA KEV

KEV coverage does not rule out exploitation.

KEV checked 28/11/2026, 20:55:32 UTC
EEF · CVSS:4.0 · 2.1
Assessment 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
OSV · CVSS:4.0 · 2.1
Assessment 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
The headline uses the highest imported catalog score. Assessments can differ by source and CVSS version.

Severity

low2.1

CVSS 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 · OSV

Attack 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

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

unaffected

unknown

Other versions: unaffected

Product identifiers (CPE)cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*

ash-project · EEF

ash_sql

1 range

Package identity

pkg:github/ash-project/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

dd092ed273dec7bd2194352f24a39229fc8ae68b → before 3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889

git versions

unaffected

unknown

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 versions0.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-ADP

Original 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 sources

Inside the record

Evidence available

Package identity
Version evidence
Remediation guidance · not supplied
Weakness classification
Additional publishers

Describes the evidence in this view, not whether the product is safe.

Original records

CVE-2026-81318

View 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.

CWE-863 ↗

CWE-863 Incorrect Authorization

EEF

Related →

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
EEF

Assigning organization

2026-11-19
CISA-ADP

Additional data publisher

2026-08-31

Timeline

All times UTC
  1. Advisory published

    Publication date supplied by the source.

  2. Source updated

    Latest modification date supplied by the source.

  3. Last imported by cve.new

    Latest catalog import, not the date we first saw this advisory.

What changed

Follow changes
No substantive changes have been recorded here yet. History starts when cve.new observes a change after tracking is enabled; earlier edits are not reconstructed.

Large field values are marked as truncated previews. Original source snapshots remain retained.

Recent advisories affecting the same package or the same recorded vendor and product. These are separate vulnerabilities, not additional evidence for this advisory.

low2.1
CVE-2026-81316Package fixes recorded

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

low2.1
CVE-2026-78691Package fixes recorded

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

low2.1
CVE-2026-80227Package fixes recorded

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