Search
Find a vulnerability
Search criteria
ⓘ
Use this form to refine search results.
Full-text search supports keyword queries with ranking and filtering.
You can combine vendor, product, and sources to narrow results.
Enable “Apply ordering” to sort by date instead of relevance.
10 vulnerabilities found for ash_sql by ash-project
CVE-2026-81318 (GCVE-0-2026-81318)
Vulnerability from nvd – Published: 2026-08-30 11:56 – Updated: 2026-08-30 11:56
VLAI
EPSS
VEX
Title
Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql
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.
Severity
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-81318.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-81318 | related |
| https://github.com/ash-project/ash_sql/commit/3d9… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.0 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
dd092ed273dec7bd2194352f24a39229fc8ae68b , < 3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.AggregateQuery\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate_query.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.AggregateQuery\u0027:add_single_aggs/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.0",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.AggregateQuery\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate_query.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.AggregateQuery\u0027:add_single_aggs/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889",
"status": "affected",
"version": "dd092ed273dec7bd2194352f24a39229fc8ae68b",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must use AshPostgres schema-based (\u003ccode\u003estrategy(:context)\u003c/code\u003e) multitenancy and compute an aggregate over a \u003ccode\u003edistinct\u003c/code\u003e query (for example an aggregate whose query filters across a to-many relationship).\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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)."
}
],
"value": "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)."
}
],
"cpeApplicability": [
{
"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"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect Authorization vulnerability in ash-project ash_sql allows a caller in a schema-based multitenant application to receive aggregate values computed from another tenant\u0027s rows.\u003c/p\u003e\n\u003cp\u003eWhen an aggregate is computed over a \u003ccode\u003edistinct\u003c/code\u003e query, \u003ccode\u003eAshSql.AggregateQuery.add_single_aggs/5\u003c/code\u003e rebuilds the outer query from \u003ccode\u003equery.from.source\u003c/code\u003e alone, which is only the \u003ccode\u003e{table, schema}\u003c/code\u003e tuple and does not carry \u003ccode\u003equery.prefix\u003c/code\u003e or \u003ccode\u003equery.from.prefix\u003c/code\u003e. For \u003ccode\u003estrategy(:context)\u003c/code\u003e multitenancy those hold the tenant schema, so the rebuilt outer query reads the repo\u0027s 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\u0027s rows. The neighbouring limit and exists branches instead wrap the query with \u003ccode\u003esubquery/1\u003c/code\u003e, which preserves the prefix.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.0 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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\u0027s rows.\n\nWhen 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\u0027s 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\u0027s rows. The neighbouring limit and exists branches instead wrap the query with `subquery/1`, which preserves the prefix.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"value": "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\u0027s rows.\n\nWhen 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\u0027s 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\u0027s rows. The neighbouring limit and exists branches instead wrap the query with subquery/1, which preserves the prefix.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-1",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:56:52.921Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-ww8j-58rc-f8h3"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-81318.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-81318"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-81318",
"datePublished": "2026-08-30T11:56:52.921Z",
"dateReserved": "2026-08-30T02:30:02.111Z",
"dateUpdated": "2026-08-30T11:56:52.921Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-81316 (GCVE-0-2026-81316)
Vulnerability from nvd – Published: 2026-08-30 11:59 – Updated: 2026-08-30 11:59
VLAI
EPSS
VEX
Title
Same-named aggregates with differing filters are conflated in AshSql
Summary
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.
AshSql.Aggregate.different_queries?/2 reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and select_aggregates returns the first-registered variant's value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate's query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.
This issue affects ash_sql: from 0.1.0 before 0.7.1.
Severity
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-81316.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-81316 | related |
| https://github.com/ash-project/ash_sql/commit/4b9… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.0 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
dd092ed273dec7bd2194352f24a39229fc8ae68b , < 4b95468e5434a3526571414219719c9518be6694
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Aggregate\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:different_queries?/2"
},
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:add_aggregates/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.0",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Aggregate\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:different_queries?/2"
},
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:add_aggregates/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "4b95468e5434a3526571414219719c9518be6694",
"status": "affected",
"version": "dd092ed273dec7bd2194352f24a39229fc8ae68b",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must compute an aggregate whose name also reaches the query builder under a second, differently filtered context (for example the same aggregate used both as a filter dependency and loaded, where actor or tenant scoping stamps distinct filters onto each).\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must compute an aggregate whose name also reaches the query builder under a second, differently filtered context (for example the same aggregate used both as a filter dependency and loaded, where actor or tenant scoping stamps distinct filters onto each)."
}
],
"value": "An application must compute an aggregate whose name also reaches the query builder under a second, differently filtered context (for example the same aggregate used both as a filter dependency and loaded, where actor or tenant scoping stamps distinct filters onto each)."
}
],
"cpeApplicability": [
{
"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"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect 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.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eAshSql.Aggregate.different_queries?/2\u003c/code\u003e reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and \u003ccode\u003eselect_aggregates\u003c/code\u003e returns the first-registered variant\u0027s value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate\u0027s query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.0 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\n`AshSql.Aggregate.different_queries?/2` reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and `select_aggregates` returns the first-registered variant\u0027s value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate\u0027s query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"value": "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.\n\nAshSql.Aggregate.different_queries?/2 reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and select_aggregates returns the first-registered variant\u0027s value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate\u0027s query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-1",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:59:41.945Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-v7pf-wjxc-7j5m"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-81316.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-81316"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/4b95468e5434a3526571414219719c9518be6694"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Same-named aggregates with differing filters are conflated in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-81316",
"datePublished": "2026-08-30T11:59:41.945Z",
"dateReserved": "2026-08-29T23:30:01.223Z",
"dateUpdated": "2026-08-30T11:59:41.945Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-80227 (GCVE-0-2026-80227)
Vulnerability from nvd – Published: 2026-08-30 11:53 – Updated: 2026-08-30 11:53
VLAI
EPSS
VEX
Title
SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql
Summary
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).
string_trim/1 compiles to REGEXP_REPLACE patterns built from an Elixir string in which \s is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas String.trim/1 in Elixir removes them all. Any Ash filter, validation, or identity that relies on string_trim/1 then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.
This issue affects ash_sql: from 0.1.0 before 0.7.1.
Severity
CWE
- CWE-697 - Incorrect Comparison
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-80227.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-80227 | related |
| https://github.com/ash-project/ash_sql/commit/1b1… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.0 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
dd092ed273dec7bd2194352f24a39229fc8ae68b , < 1b11b5d8bc5321e2e6acac21594ef08f61986117
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:do_dynamic_expr/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.0",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:do_dynamic_expr/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "1b11b5d8bc5321e2e6acac21594ef08f61986117",
"status": "affected",
"version": "dd092ed273dec7bd2194352f24a39229fc8ae68b",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must use \u003ccode\u003estring_trim/1\u003c/code\u003e in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must use `string_trim/1` in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness."
}
],
"value": "An application must use string_trim/1 in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness."
}
],
"cpeApplicability": [
{
"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"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect 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).\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003estring_trim/1\u003c/code\u003e compiles to \u003ccode\u003eREGEXP_REPLACE\u003c/code\u003e patterns built from an Elixir string in which \u003ccode\u003e\\s\u003c/code\u003e is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas \u003ccode\u003eString.trim/1\u003c/code\u003e in Elixir removes them all. Any Ash filter, validation, or identity that relies on \u003ccode\u003estring_trim/1\u003c/code\u003e then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.0 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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).\n\n`string_trim/1` compiles to `REGEXP_REPLACE` patterns built from an Elixir string in which `\\s` is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas `String.trim/1` in Elixir removes them all. Any Ash filter, validation, or identity that relies on `string_trim/1` then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"value": "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).\n\nstring_trim/1 compiles to REGEXP_REPLACE patterns built from an Elixir string in which \\s is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas String.trim/1 in Elixir removes them all. Any Ash filter, validation, or identity that relies on string_trim/1 then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-3",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-3 Using Leading \u0027Ghost\u0027 Character Sequences to Bypass Input Filters"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "NONE",
"vulnIntegrityImpact": "LOW",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-697",
"description": "CWE-697 Incorrect Comparison",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:53:35.548Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-76wx-w7ww-5xfq"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-80227.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-80227"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/1b11b5d8bc5321e2e6acac21594ef08f61986117"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-80227",
"datePublished": "2026-08-30T11:53:35.548Z",
"dateReserved": "2026-08-30T05:45:01.813Z",
"dateUpdated": "2026-08-30T11:53:35.548Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-78691 (GCVE-0-2026-78691)
Vulnerability from nvd – Published: 2026-08-30 11:55 – Updated: 2026-08-30 11:55
VLAI
EPSS
VEX
Title
Unescaped backslash allows LIKE wildcard injection in AshSql string search
Summary
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.
The escape helpers in AshSql.Expr prefix % and _ with a backslash but never escape a backslash already present in the input. Because backslash is the default LIKE escape character, the escaping defeats itself: the input \% becomes the pattern fragment \\%, where \\ is a literal backslash and the attacker's % remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated contains(...) guard, or crash the query with a trailing lone backslash.
This issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1.
Severity
CWE
- CWE-943 - Improper Neutralization of Special Elements in Data Query Logic
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-78691.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-78691 | related |
| https://github.com/ash-project/ash_sql/commit/d95… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.1-rc.10 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
cfc7da474c5be2190fd62664a83a689377a8d512 , < d95c55c64b1b42cc2fd30211a4913f3145156cd4
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_contains/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_starts_with/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_ends_with/1"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.1-rc.10",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_contains/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_starts_with/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_ends_with/1"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "d95c55c64b1b42cc2fd30211a4913f3145156cd4",
"status": "affected",
"version": "cfc7da474c5be2190fd62664a83a689377a8d512",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must pass untrusted input as the search term of \u003ccode\u003econtains/2\u003c/code\u003e, \u003ccode\u003estring_starts_with/2\u003c/code\u003e, or \u003ccode\u003estring_ends_with/2\u003c/code\u003e (for example a user-controlled substring search).\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must pass untrusted input as the search term of `contains/2`, `string_starts_with/2`, or `string_ends_with/2` (for example a user-controlled substring search)."
}
],
"value": "An application must pass untrusted input as the search term of contains/2, string_starts_with/2, or string_ends_with/2 (for example a user-controlled substring search)."
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*",
"versionEndExcluding": "0.7.1",
"versionStartIncluding": "0.1.1-rc.10",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eImproper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash_sql allows a user who supplies a search term to \u003ccode\u003econtains/2\u003c/code\u003e, \u003ccode\u003estring_starts_with/2\u003c/code\u003e, or \u003ccode\u003estring_ends_with/2\u003c/code\u003e to inject live SQL \u003ccode\u003eLIKE\u003c/code\u003e wildcards, turning a literal substring search into an attacker-controlled pattern match.\u003c/p\u003e\n\u003cp\u003eThe escape helpers in \u003ccode\u003eAshSql.Expr\u003c/code\u003e prefix \u003ccode\u003e%\u003c/code\u003e and \u003ccode\u003e_\u003c/code\u003e with a backslash but never escape a backslash already present in the input. Because backslash is the default \u003ccode\u003eLIKE\u003c/code\u003e escape character, the escaping defeats itself: the input \u003ccode\u003e\\%\u003c/code\u003e becomes the pattern fragment \u003ccode\u003e\\\\%\u003c/code\u003e, where \u003ccode\u003e\\\\\u003c/code\u003e is a literal backslash and the attacker\u0027s \u003ccode\u003e%\u003c/code\u003e remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated \u003ccode\u003econtains(...)\u003c/code\u003e guard, or crash the query with a trailing lone backslash.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\nThe escape helpers in `AshSql.Expr` prefix `%` and `_` with a backslash but never escape a backslash already present in the input. Because backslash is the default `LIKE` escape character, the escaping defeats itself: the input `\\%` becomes the pattern fragment `\\\\%`, where `\\\\` is a literal backslash and the attacker\u0027s `%` remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated `contains(...)` guard, or crash the query with a trailing lone backslash.\n\nThis issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1."
}
],
"value": "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.\n\nThe escape helpers in AshSql.Expr prefix % and _ with a backslash but never escape a backslash already present in the input. Because backslash is the default LIKE escape character, the escaping defeats itself: the input \\% becomes the pattern fragment \\\\%, where \\\\ is a literal backslash and the attacker\u0027s % remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated contains(...) guard, or crash the query with a trailing lone backslash.\n\nThis issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-116",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-116 Excavation"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-943",
"description": "CWE-943 Improper Neutralization of Special Elements in Data Query Logic",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:55:20.331Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-5jgp-7mhc-6qqh"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-78691.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-78691"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/d95c55c64b1b42cc2fd30211a4913f3145156cd4"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Unescaped backslash allows LIKE wildcard injection in AshSql string search"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-78691",
"datePublished": "2026-08-30T11:55:20.331Z",
"dateReserved": "2026-08-30T05:45:01.818Z",
"dateUpdated": "2026-08-30T11:55:20.331Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-77454 (GCVE-0-2026-77454)
Vulnerability from nvd – Published: 2026-08-30 12:01 – Updated: 2026-08-30 12:01
VLAI
EPSS
VEX
Title
exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql
Summary
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.
AshSql.Join.related_query/3 skips the caller-supplied exists predicate for such relationships and delegates it to limit_from_many/5. When the relationship's own filter or sort references parent(...), limit_from_many/5 takes a branch that drops both the limit and the predicate, emitting a bare correlated EXISTS with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example authorize_if expr(exists(memberships, user_id == ^actor(:id)))), the actor-scoping condition disappears and the policy passes for any actor with any related row.
This issue affects ash_sql: from 0.4.1 before 0.7.1.
Severity
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-77454.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-77454 | related |
| https://github.com/ash-project/ash_sql/commit/865… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.4.1 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
e26a63b29bd7501505fafd726f14262cdc3b6629 , < 865fdd4e5e70724a23b19c048e6768c31d2209ab
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Join\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/join.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Join\u0027:related_query/3"
},
{
"name": "\u0027Elixir.AshSql.Join\u0027:limit_from_many/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.4.1",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Join\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/join.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Join\u0027:related_query/3"
},
{
"name": "\u0027Elixir.AshSql.Join\u0027:limit_from_many/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "865fdd4e5e70724a23b19c048e6768c31d2209ab",
"status": "affected",
"version": "e26a63b29bd7501505fafd726f14262cdc3b6629",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must use \u003ccode\u003eexists/2\u003c/code\u003e (in a filter or a policy) over a relationship that declares both a limit or \u003ccode\u003efrom_many?\u003c/code\u003e and a filter or sort that references \u003ccode\u003eparent(...)\u003c/code\u003e. The predicate supplied to \u003ccode\u003eexists/2\u003c/code\u003e is the one that is dropped.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must use `exists/2` (in a filter or a policy) over a relationship that declares both a limit or `from_many?` and a filter or sort that references `parent(...)`. The predicate supplied to `exists/2` is the one that is dropped."
}
],
"value": "An application must use exists/2 (in a filter or a policy) over a relationship that declares both a limit or from_many? and a filter or sort that references parent(...). The predicate supplied to exists/2 is the one that is dropped."
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*",
"versionEndExcluding": "0.7.1",
"versionStartIncluding": "0.4.1",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect Authorization vulnerability in ash-project ash_sql allows a caller to bypass a scoping or authorization filter expressed as \u003ccode\u003eexists/2\u003c/code\u003e over a relationship that declares both a limit (or \u003ccode\u003efrom_many?\u003c/code\u003e) and a \u003ccode\u003eparent(...)\u003c/code\u003e-referencing filter or sort.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eAshSql.Join.related_query/3\u003c/code\u003e skips the caller-supplied \u003ccode\u003eexists\u003c/code\u003e predicate for such relationships and delegates it to \u003ccode\u003elimit_from_many/5\u003c/code\u003e. When the relationship\u0027s own filter or sort references \u003ccode\u003eparent(...)\u003c/code\u003e, \u003ccode\u003elimit_from_many/5\u003c/code\u003e takes a branch that drops both the limit and the predicate, emitting a bare correlated \u003ccode\u003eEXISTS\u003c/code\u003e with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example \u003ccode\u003eauthorize_if expr(exists(memberships, user_id == ^actor(:id)))\u003c/code\u003e), the actor-scoping condition disappears and the policy passes for any actor with any related row.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.4.1 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\n`AshSql.Join.related_query/3` skips the caller-supplied `exists` predicate for such relationships and delegates it to `limit_from_many/5`. When the relationship\u0027s own filter or sort references `parent(...)`, `limit_from_many/5` takes a branch that drops both the limit and the predicate, emitting a bare correlated `EXISTS` with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example `authorize_if expr(exists(memberships, user_id == ^actor(:id)))`), the actor-scoping condition disappears and the policy passes for any actor with any related row.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1."
}
],
"value": "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.\n\nAshSql.Join.related_query/3 skips the caller-supplied exists predicate for such relationships and delegates it to limit_from_many/5. When the relationship\u0027s own filter or sort references parent(...), limit_from_many/5 takes a branch that drops both the limit and the predicate, emitting a bare correlated EXISTS with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example authorize_if expr(exists(memberships, user_id == ^actor(:id)))), the actor-scoping condition disappears and the policy passes for any actor with any related row.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-1",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 5.9,
"baseSeverity": "MEDIUM",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "LOW",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T12:01:23.862Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-8v9m-8pxv-738c"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-77454.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-77454"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/865fdd4e5e70724a23b19c048e6768c31d2209ab"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-77454",
"datePublished": "2026-08-30T12:01:23.862Z",
"dateReserved": "2026-08-30T04:45:01.559Z",
"dateUpdated": "2026-08-30T12:01:23.862Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-77454 (GCVE-0-2026-77454)
Vulnerability from cvelistv5 – Published: 2026-08-30 12:01 – Updated: 2026-08-30 12:01
VLAI
EPSS
VEX
Title
exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql
Summary
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.
AshSql.Join.related_query/3 skips the caller-supplied exists predicate for such relationships and delegates it to limit_from_many/5. When the relationship's own filter or sort references parent(...), limit_from_many/5 takes a branch that drops both the limit and the predicate, emitting a bare correlated EXISTS with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example authorize_if expr(exists(memberships, user_id == ^actor(:id)))), the actor-scoping condition disappears and the policy passes for any actor with any related row.
This issue affects ash_sql: from 0.4.1 before 0.7.1.
Severity
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-77454.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-77454 | related |
| https://github.com/ash-project/ash_sql/commit/865… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.4.1 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
e26a63b29bd7501505fafd726f14262cdc3b6629 , < 865fdd4e5e70724a23b19c048e6768c31d2209ab
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Join\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/join.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Join\u0027:related_query/3"
},
{
"name": "\u0027Elixir.AshSql.Join\u0027:limit_from_many/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.4.1",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Join\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/join.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Join\u0027:related_query/3"
},
{
"name": "\u0027Elixir.AshSql.Join\u0027:limit_from_many/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "865fdd4e5e70724a23b19c048e6768c31d2209ab",
"status": "affected",
"version": "e26a63b29bd7501505fafd726f14262cdc3b6629",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must use \u003ccode\u003eexists/2\u003c/code\u003e (in a filter or a policy) over a relationship that declares both a limit or \u003ccode\u003efrom_many?\u003c/code\u003e and a filter or sort that references \u003ccode\u003eparent(...)\u003c/code\u003e. The predicate supplied to \u003ccode\u003eexists/2\u003c/code\u003e is the one that is dropped.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must use `exists/2` (in a filter or a policy) over a relationship that declares both a limit or `from_many?` and a filter or sort that references `parent(...)`. The predicate supplied to `exists/2` is the one that is dropped."
}
],
"value": "An application must use exists/2 (in a filter or a policy) over a relationship that declares both a limit or from_many? and a filter or sort that references parent(...). The predicate supplied to exists/2 is the one that is dropped."
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*",
"versionEndExcluding": "0.7.1",
"versionStartIncluding": "0.4.1",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect Authorization vulnerability in ash-project ash_sql allows a caller to bypass a scoping or authorization filter expressed as \u003ccode\u003eexists/2\u003c/code\u003e over a relationship that declares both a limit (or \u003ccode\u003efrom_many?\u003c/code\u003e) and a \u003ccode\u003eparent(...)\u003c/code\u003e-referencing filter or sort.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eAshSql.Join.related_query/3\u003c/code\u003e skips the caller-supplied \u003ccode\u003eexists\u003c/code\u003e predicate for such relationships and delegates it to \u003ccode\u003elimit_from_many/5\u003c/code\u003e. When the relationship\u0027s own filter or sort references \u003ccode\u003eparent(...)\u003c/code\u003e, \u003ccode\u003elimit_from_many/5\u003c/code\u003e takes a branch that drops both the limit and the predicate, emitting a bare correlated \u003ccode\u003eEXISTS\u003c/code\u003e with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example \u003ccode\u003eauthorize_if expr(exists(memberships, user_id == ^actor(:id)))\u003c/code\u003e), the actor-scoping condition disappears and the policy passes for any actor with any related row.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.4.1 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\n`AshSql.Join.related_query/3` skips the caller-supplied `exists` predicate for such relationships and delegates it to `limit_from_many/5`. When the relationship\u0027s own filter or sort references `parent(...)`, `limit_from_many/5` takes a branch that drops both the limit and the predicate, emitting a bare correlated `EXISTS` with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example `authorize_if expr(exists(memberships, user_id == ^actor(:id)))`), the actor-scoping condition disappears and the policy passes for any actor with any related row.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1."
}
],
"value": "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.\n\nAshSql.Join.related_query/3 skips the caller-supplied exists predicate for such relationships and delegates it to limit_from_many/5. When the relationship\u0027s own filter or sort references parent(...), limit_from_many/5 takes a branch that drops both the limit and the predicate, emitting a bare correlated EXISTS with no predicate. The check then matches any record that has any related row. Most severely, when the expression backs a policy (for example authorize_if expr(exists(memberships, user_id == ^actor(:id)))), the actor-scoping condition disappears and the policy passes for any actor with any related row.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-1",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 5.9,
"baseSeverity": "MEDIUM",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "LOW",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T12:01:23.862Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-8v9m-8pxv-738c"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-77454.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-77454"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/865fdd4e5e70724a23b19c048e6768c31d2209ab"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-77454",
"datePublished": "2026-08-30T12:01:23.862Z",
"dateReserved": "2026-08-30T04:45:01.559Z",
"dateUpdated": "2026-08-30T12:01:23.862Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-81316 (GCVE-0-2026-81316)
Vulnerability from cvelistv5 – Published: 2026-08-30 11:59 – Updated: 2026-08-30 11:59
VLAI
EPSS
VEX
Title
Same-named aggregates with differing filters are conflated in AshSql
Summary
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.
AshSql.Aggregate.different_queries?/2 reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and select_aggregates returns the first-registered variant's value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate's query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.
This issue affects ash_sql: from 0.1.0 before 0.7.1.
Severity
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-81316.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-81316 | related |
| https://github.com/ash-project/ash_sql/commit/4b9… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.0 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
dd092ed273dec7bd2194352f24a39229fc8ae68b , < 4b95468e5434a3526571414219719c9518be6694
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Aggregate\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:different_queries?/2"
},
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:add_aggregates/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.0",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Aggregate\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:different_queries?/2"
},
{
"name": "\u0027Elixir.AshSql.Aggregate\u0027:add_aggregates/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "4b95468e5434a3526571414219719c9518be6694",
"status": "affected",
"version": "dd092ed273dec7bd2194352f24a39229fc8ae68b",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must compute an aggregate whose name also reaches the query builder under a second, differently filtered context (for example the same aggregate used both as a filter dependency and loaded, where actor or tenant scoping stamps distinct filters onto each).\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must compute an aggregate whose name also reaches the query builder under a second, differently filtered context (for example the same aggregate used both as a filter dependency and loaded, where actor or tenant scoping stamps distinct filters onto each)."
}
],
"value": "An application must compute an aggregate whose name also reaches the query builder under a second, differently filtered context (for example the same aggregate used both as a filter dependency and loaded, where actor or tenant scoping stamps distinct filters onto each)."
}
],
"cpeApplicability": [
{
"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"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect 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.\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eAshSql.Aggregate.different_queries?/2\u003c/code\u003e reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and \u003ccode\u003eselect_aggregates\u003c/code\u003e returns the first-registered variant\u0027s value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate\u0027s query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.0 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\n`AshSql.Aggregate.different_queries?/2` reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and `select_aggregates` returns the first-registered variant\u0027s value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate\u0027s query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"value": "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.\n\nAshSql.Aggregate.different_queries?/2 reports two aggregate queries as different only when their filter and their sort both differ. Aggregate queries rarely carry a sort, so two aggregates that share a name but carry entirely different filters compare as identical. The colliding aggregate keeps its name and is treated as already computed, and select_aggregates returns the first-registered variant\u0027s value. The same name reaches the builder twice with different filters when actor or tenant context is stamped into each aggregate\u0027s query, so a narrowly filtered aggregate can be served the value of a previously registered broad one.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-1",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:59:41.945Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-v7pf-wjxc-7j5m"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-81316.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-81316"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/4b95468e5434a3526571414219719c9518be6694"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Same-named aggregates with differing filters are conflated in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-81316",
"datePublished": "2026-08-30T11:59:41.945Z",
"dateReserved": "2026-08-29T23:30:01.223Z",
"dateUpdated": "2026-08-30T11:59:41.945Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-81318 (GCVE-0-2026-81318)
Vulnerability from cvelistv5 – Published: 2026-08-30 11:56 – Updated: 2026-08-30 11:56
VLAI
EPSS
VEX
Title
Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql
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.
Severity
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-81318.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-81318 | related |
| https://github.com/ash-project/ash_sql/commit/3d9… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.0 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
dd092ed273dec7bd2194352f24a39229fc8ae68b , < 3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.AggregateQuery\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate_query.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.AggregateQuery\u0027:add_single_aggs/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.0",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.AggregateQuery\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/aggregate_query.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.AggregateQuery\u0027:add_single_aggs/5"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889",
"status": "affected",
"version": "dd092ed273dec7bd2194352f24a39229fc8ae68b",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must use AshPostgres schema-based (\u003ccode\u003estrategy(:context)\u003c/code\u003e) multitenancy and compute an aggregate over a \u003ccode\u003edistinct\u003c/code\u003e query (for example an aggregate whose query filters across a to-many relationship).\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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)."
}
],
"value": "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)."
}
],
"cpeApplicability": [
{
"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"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect Authorization vulnerability in ash-project ash_sql allows a caller in a schema-based multitenant application to receive aggregate values computed from another tenant\u0027s rows.\u003c/p\u003e\n\u003cp\u003eWhen an aggregate is computed over a \u003ccode\u003edistinct\u003c/code\u003e query, \u003ccode\u003eAshSql.AggregateQuery.add_single_aggs/5\u003c/code\u003e rebuilds the outer query from \u003ccode\u003equery.from.source\u003c/code\u003e alone, which is only the \u003ccode\u003e{table, schema}\u003c/code\u003e tuple and does not carry \u003ccode\u003equery.prefix\u003c/code\u003e or \u003ccode\u003equery.from.prefix\u003c/code\u003e. For \u003ccode\u003estrategy(:context)\u003c/code\u003e multitenancy those hold the tenant schema, so the rebuilt outer query reads the repo\u0027s 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\u0027s rows. The neighbouring limit and exists branches instead wrap the query with \u003ccode\u003esubquery/1\u003c/code\u003e, which preserves the prefix.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.0 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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\u0027s rows.\n\nWhen 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\u0027s 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\u0027s rows. The neighbouring limit and exists branches instead wrap the query with `subquery/1`, which preserves the prefix.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"value": "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\u0027s rows.\n\nWhen 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\u0027s 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\u0027s rows. The neighbouring limit and exists branches instead wrap the query with subquery/1, which preserves the prefix.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-1",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863 Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:56:52.921Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-ww8j-58rc-f8h3"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-81318.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-81318"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/3d95478cc9e1d5bfaf6144fe9b9793f29e5ab889"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Distinct-query aggregate drops the tenant schema prefix, leaking across tenants in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-81318",
"datePublished": "2026-08-30T11:56:52.921Z",
"dateReserved": "2026-08-30T02:30:02.111Z",
"dateUpdated": "2026-08-30T11:56:52.921Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-78691 (GCVE-0-2026-78691)
Vulnerability from cvelistv5 – Published: 2026-08-30 11:55 – Updated: 2026-08-30 11:55
VLAI
EPSS
VEX
Title
Unescaped backslash allows LIKE wildcard injection in AshSql string search
Summary
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.
The escape helpers in AshSql.Expr prefix % and _ with a backslash but never escape a backslash already present in the input. Because backslash is the default LIKE escape character, the escaping defeats itself: the input \% becomes the pattern fragment \\%, where \\ is a literal backslash and the attacker's % remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated contains(...) guard, or crash the query with a trailing lone backslash.
This issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1.
Severity
CWE
- CWE-943 - Improper Neutralization of Special Elements in Data Query Logic
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-78691.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-78691 | related |
| https://github.com/ash-project/ash_sql/commit/d95… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.1-rc.10 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
cfc7da474c5be2190fd62664a83a689377a8d512 , < d95c55c64b1b42cc2fd30211a4913f3145156cd4
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_contains/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_starts_with/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_ends_with/1"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.1-rc.10",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_contains/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_starts_with/1"
},
{
"name": "\u0027Elixir.AshSql.Expr\u0027:escape_ends_with/1"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "d95c55c64b1b42cc2fd30211a4913f3145156cd4",
"status": "affected",
"version": "cfc7da474c5be2190fd62664a83a689377a8d512",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must pass untrusted input as the search term of \u003ccode\u003econtains/2\u003c/code\u003e, \u003ccode\u003estring_starts_with/2\u003c/code\u003e, or \u003ccode\u003estring_ends_with/2\u003c/code\u003e (for example a user-controlled substring search).\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must pass untrusted input as the search term of `contains/2`, `string_starts_with/2`, or `string_ends_with/2` (for example a user-controlled substring search)."
}
],
"value": "An application must pass untrusted input as the search term of contains/2, string_starts_with/2, or string_ends_with/2 (for example a user-controlled substring search)."
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*",
"versionEndExcluding": "0.7.1",
"versionStartIncluding": "0.1.1-rc.10",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
],
"operator": "AND"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eImproper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash_sql allows a user who supplies a search term to \u003ccode\u003econtains/2\u003c/code\u003e, \u003ccode\u003estring_starts_with/2\u003c/code\u003e, or \u003ccode\u003estring_ends_with/2\u003c/code\u003e to inject live SQL \u003ccode\u003eLIKE\u003c/code\u003e wildcards, turning a literal substring search into an attacker-controlled pattern match.\u003c/p\u003e\n\u003cp\u003eThe escape helpers in \u003ccode\u003eAshSql.Expr\u003c/code\u003e prefix \u003ccode\u003e%\u003c/code\u003e and \u003ccode\u003e_\u003c/code\u003e with a backslash but never escape a backslash already present in the input. Because backslash is the default \u003ccode\u003eLIKE\u003c/code\u003e escape character, the escaping defeats itself: the input \u003ccode\u003e\\%\u003c/code\u003e becomes the pattern fragment \u003ccode\u003e\\\\%\u003c/code\u003e, where \u003ccode\u003e\\\\\u003c/code\u003e is a literal backslash and the attacker\u0027s \u003ccode\u003e%\u003c/code\u003e remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated \u003ccode\u003econtains(...)\u003c/code\u003e guard, or crash the query with a trailing lone backslash.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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.\n\nThe escape helpers in `AshSql.Expr` prefix `%` and `_` with a backslash but never escape a backslash already present in the input. Because backslash is the default `LIKE` escape character, the escaping defeats itself: the input `\\%` becomes the pattern fragment `\\\\%`, where `\\\\` is a literal backslash and the attacker\u0027s `%` remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated `contains(...)` guard, or crash the query with a trailing lone backslash.\n\nThis issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1."
}
],
"value": "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.\n\nThe escape helpers in AshSql.Expr prefix % and _ with a backslash but never escape a backslash already present in the input. Because backslash is the default LIKE escape character, the escaping defeats itself: the input \\% becomes the pattern fragment \\\\%, where \\\\ is a literal backslash and the attacker\u0027s % remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated contains(...) guard, or crash the query with a trailing lone backslash.\n\nThis issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-116",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-116 Excavation"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "LOW",
"vulnIntegrityImpact": "NONE",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-943",
"description": "CWE-943 Improper Neutralization of Special Elements in Data Query Logic",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:55:20.331Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-5jgp-7mhc-6qqh"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-78691.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-78691"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/d95c55c64b1b42cc2fd30211a4913f3145156cd4"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "Unescaped backslash allows LIKE wildcard injection in AshSql string search"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-78691",
"datePublished": "2026-08-30T11:55:20.331Z",
"dateReserved": "2026-08-30T05:45:01.818Z",
"dateUpdated": "2026-08-30T11:55:20.331Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
CVE-2026-80227 (GCVE-0-2026-80227)
Vulnerability from cvelistv5 – Published: 2026-08-30 11:53 – Updated: 2026-08-30 11:53
VLAI
EPSS
VEX
Title
SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql
Summary
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).
string_trim/1 compiles to REGEXP_REPLACE patterns built from an Elixir string in which \s is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas String.trim/1 in Elixir removes them all. Any Ash filter, validation, or identity that relies on string_trim/1 then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.
This issue affects ash_sql: from 0.1.0 before 0.7.1.
Severity
CWE
- CWE-697 - Incorrect Comparison
Assigner
References
4 references
| URL | Tags |
|---|---|
| https://github.com/ash-project/ash_sql/security/a… | vendor-advisoryrelated |
| https://cna.erlef.org/cves/CVE-2026-80227.html | related |
| https://osv.dev/vulnerability/EEF-CVE-2026-80227 | related |
| https://github.com/ash-project/ash_sql/commit/1b1… | patch |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| ash-project | ash_sql |
Affected:
0.1.0 , < 0.7.1
(semver)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
|
| ash-project | ash_sql |
Affected:
dd092ed273dec7bd2194352f24a39229fc8ae68b , < 1b11b5d8bc5321e2e6acac21594ef08f61986117
(git)
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:* |
{
"containers": {
"cna": {
"affected": [
{
"collectionURL": "https://repo.hex.pm",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash_sql",
"packageURL": "pkg:hex/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:do_dynamic_expr/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "0.7.1",
"status": "affected",
"version": "0.1.0",
"versionType": "semver"
}
]
},
{
"collectionURL": "https://github.com",
"cpes": [
"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*"
],
"defaultStatus": "unaffected",
"modules": [
"\u0027Elixir.AshSql.Expr\u0027"
],
"packageName": "ash-project/ash_sql",
"packageURL": "pkg:github/ash-project/ash_sql",
"product": "ash_sql",
"programFiles": [
"lib/expr.ex"
],
"programRoutines": [
{
"name": "\u0027Elixir.AshSql.Expr\u0027:do_dynamic_expr/6"
}
],
"repo": "https://github.com/ash-project/ash_sql",
"vendor": "ash-project",
"versions": [
{
"lessThan": "1b11b5d8bc5321e2e6acac21594ef08f61986117",
"status": "affected",
"version": "dd092ed273dec7bd2194352f24a39229fc8ae68b",
"versionType": "git"
}
]
}
],
"configurations": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eAn application must use \u003ccode\u003estring_trim/1\u003c/code\u003e in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "An application must use `string_trim/1` in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness."
}
],
"value": "An application must use string_trim/1 in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness."
}
],
"cpeApplicability": [
{
"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"
}
],
"credits": [
{
"lang": "en",
"type": "finder",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "reporter",
"value": "Peter Ullrich"
},
{
"lang": "en",
"type": "remediation developer",
"value": "Zach Daniel / Ash Project"
},
{
"lang": "en",
"type": "coordinator",
"value": "Jonatan M\u00e4nnchen / EEF"
}
],
"descriptions": [
{
"lang": "en",
"supportingMedia": [
{
"base64": false,
"type": "text/html",
"value": "\u003cp\u003eIncorrect 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).\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003estring_trim/1\u003c/code\u003e compiles to \u003ccode\u003eREGEXP_REPLACE\u003c/code\u003e patterns built from an Elixir string in which \u003ccode\u003e\\s\u003c/code\u003e is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas \u003ccode\u003eString.trim/1\u003c/code\u003e in Elixir removes them all. Any Ash filter, validation, or identity that relies on \u003ccode\u003estring_trim/1\u003c/code\u003e then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.\u003c/p\u003e\n\u003cp\u003eThis issue affects ash_sql: from 0.1.0 before 0.7.1.\u003c/p\u003e"
},
{
"base64": false,
"type": "text/markdown",
"value": "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).\n\n`string_trim/1` compiles to `REGEXP_REPLACE` patterns built from an Elixir string in which `\\s` is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas `String.trim/1` in Elixir removes them all. Any Ash filter, validation, or identity that relies on `string_trim/1` then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"value": "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).\n\nstring_trim/1 compiles to REGEXP_REPLACE patterns built from an Elixir string in which \\s is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas String.trim/1 in Elixir removes them all. Any Ash filter, validation, or identity that relies on string_trim/1 then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1."
}
],
"impacts": [
{
"capecId": "CAPEC-3",
"descriptions": [
{
"lang": "en",
"value": "CAPEC-3 Using Leading \u0027Ghost\u0027 Character Sequences to Bypass Input Filters"
}
]
}
],
"metrics": [
{
"cvssV4_0": {
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"attackComplexity": "LOW",
"attackRequirements": "PRESENT",
"attackVector": "LOCAL",
"baseScore": 2.1,
"baseSeverity": "LOW",
"privilegesRequired": "NONE",
"providerUrgency": "NOT_DEFINED",
"subAvailabilityImpact": "NONE",
"subConfidentialityImpact": "NONE",
"subIntegrityImpact": "NONE",
"userInteraction": "NONE",
"valueDensity": "NOT_DEFINED",
"vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
"version": "4.0",
"vulnAvailabilityImpact": "NONE",
"vulnConfidentialityImpact": "NONE",
"vulnIntegrityImpact": "LOW",
"vulnerabilityResponseEffort": "NOT_DEFINED"
},
"format": "CVSS",
"scenarios": [
{
"lang": "en",
"value": "GENERAL"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-697",
"description": "CWE-697 Incorrect Comparison",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-08-30T11:53:35.548Z",
"orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"shortName": "EEF"
},
"references": [
{
"tags": [
"vendor-advisory",
"related"
],
"url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-76wx-w7ww-5xfq"
},
{
"tags": [
"related"
],
"url": "https://cna.erlef.org/cves/CVE-2026-80227.html"
},
{
"tags": [
"related"
],
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-80227"
},
{
"tags": [
"patch"
],
"url": "https://github.com/ash-project/ash_sql/commit/1b11b5d8bc5321e2e6acac21594ef08f61986117"
}
],
"source": {
"discovery": "EXTERNAL"
},
"title": "SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql"
}
},
"cveMetadata": {
"assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
"assignerShortName": "EEF",
"cveId": "CVE-2026-80227",
"datePublished": "2026-08-30T11:53:35.548Z",
"dateReserved": "2026-08-30T05:45:01.813Z",
"dateUpdated": "2026-08-30T11:53:35.548Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}