{"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Ash.Actions.Read'","'Elixir.Ash.Actions.Aggregate'","'Elixir.Ash.Filter'","'Elixir.Ash'"],"packageName":"ash","packageURL":"pkg:hex/ash","product":"ash","programFiles":["lib/ash/actions/read/read.ex","lib/ash/actions/aggregate.ex","lib/ash/filter/filter.ex","lib/ash.ex"],"programRoutines":[{"name":"'Elixir.Ash.Actions.Read':authorize_aggregate/11"},{"name":"'Elixir.Ash.Actions.Read':handle_multitenancy/1"},{"name":"'Elixir.Ash.Actions.Aggregate':run/4"},{"name":"'Elixir.Ash.Filter':relationship_filters/7"},{"name":"'Elixir.Ash':aggregate/3"},{"name":"'Elixir.Ash':count/2"},{"name":"'Elixir.Ash':exists/2"},{"name":"'Elixir.Ash':read/2"}],"repo":"https://github.com/ash-project/ash","vendor":"ash-project","versions":[{"lessThan":"3.39.1","status":"affected","version":"2.17.22","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Ash.Actions.Read'","'Elixir.Ash.Actions.Aggregate'","'Elixir.Ash.Filter'","'Elixir.Ash'"],"packageName":"ash-project/ash","packageURL":"pkg:github/ash-project/ash","product":"ash","programFiles":["lib/ash/actions/read/read.ex","lib/ash/actions/aggregate.ex","lib/ash/filter/filter.ex","lib/ash.ex"],"programRoutines":[{"name":"'Elixir.Ash.Actions.Read':authorize_aggregate/11"},{"name":"'Elixir.Ash.Actions.Read':handle_multitenancy/1"},{"name":"'Elixir.Ash.Actions.Aggregate':run/4"},{"name":"'Elixir.Ash.Filter':relationship_filters/7"},{"name":"'Elixir.Ash':aggregate/3"},{"name":"'Elixir.Ash':count/2"},{"name":"'Elixir.Ash':exists/2"},{"name":"'Elixir.Ash':read/2"}],"repo":"https://github.com/ash-project/ash","vendor":"ash-project","versions":[{"lessThan":"42ee4418dfc968c1c5779dd928c878822f88a866","status":"affected","version":"a12131cf70872e33d881c2c7c5d65cf9d2b5fb34","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Reachable when a resource has an aggregate over a relationship whose destination has a stricter read policy than the resource itself, and one of these holds: a caller can choose the field or the <code>query:</code> of an aggregate given to <code>Ash.aggregate/3</code> (directly, through ash_lua read operations, or through the AshAi <code>aggregate</code> result type); the application defines an aggregate whose field is a calculation that uses an aggregate; or a caller can filter or sort on an aggregate that is the field, filter or sort of another aggregate. <code>Ash.count/2</code>, <code>Ash.exists/2</code> and <code>Ash.aggregate/3</code> over a resource whose own read policy is decided against the records are affected without further conditions.</p>"},{"base64":false,"type":"text/markdown","value":"Reachable when a resource has an aggregate over a relationship whose destination has a stricter read policy than the resource itself, and one of these holds: a caller can choose the field or the `query:` of an aggregate given to `Ash.aggregate/3` (directly, through ash_lua read operations, or through the AshAi `aggregate` result type); the application defines an aggregate whose field is a calculation that uses an aggregate; or a caller can filter or sort on an aggregate that is the field, filter or sort of another aggregate. `Ash.count/2`, `Ash.exists/2` and `Ash.aggregate/3` over a resource whose own read policy is decided against the records are affected without further conditions."}],"value":"Reachable when a resource has an aggregate over a relationship whose destination has a stricter read policy than the resource itself, and one of these holds: a caller can choose the field or the query: of an aggregate given to Ash.aggregate/3 (directly, through ash_lua read operations, or through the AshAi aggregate result type); the application defines an aggregate whose field is a calculation that uses an aggregate; or a caller can filter or sort on an aggregate that is the field, filter or sort of another aggregate. Ash.count/2, Ash.exists/2 and Ash.aggregate/3 over a resource whose own read policy is decided against the records are affected without further conditions."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*","versionEndExcluding":"3.39.1","versionStartIncluding":"2.17.22","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Glenn Rempe"},{"lang":"en","type":"reporter","value":"Glenn Rempe"},{"lang":"en","type":"remediation developer","value":"Glenn Rempe"},{"lang":"en","type":"remediation developer","value":"Paul Schoenfelder"},{"lang":"en","type":"remediation reviewer","value":"Glenn Rempe"},{"lang":"en","type":"remediation reviewer","value":"Zach Daniel / Ash Project"}],"dateAssigned":"2026-12-03T22:25:09.000Z","datePublic":"2026-12-04T06:18:07.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Incorrect authorization vulnerability in Ash allows an actor to read counts, sums and attribute values of related records they cannot read via aggregates.</p>\n<p><code>Ash.Actions.Read</code> (<code>lib/ash/actions/read/read.ex</code>) authorized an aggregate in two passes. <code>Ash.Filter.relationship_filters/7</code> built a policy filter for each relationship it found an aggregate reading, and <code>authorize_aggregate/11</code> looked each filter up and applied none when it found none. An aggregate the first pass did not reach ran without its destination's read policy. That covered an aggregate or calculation given as the <code>field:</code> of <code>Ash.aggregate/3</code>, the aggregates inside a calculation used as an aggregate's field, an aggregate in another aggregate's filter, sort or join filter, and an aggregate in a combination or in the sort of an atomic bulk update or destroy. <code>Ash.count/2</code>, <code>Ash.exists/2</code> and <code>Ash.aggregate/3</code> also ignored a read policy that is decided against the records, and an aggregate reached on these paths over a multitenant resource required no tenant.</p>\n<p>This issue affects ash: from 2.17.22 before 3.39.1.</p>"},{"base64":false,"type":"text/markdown","value":"Incorrect authorization vulnerability in Ash allows an actor to read counts, sums and attribute values of related records they cannot read via aggregates.\n\n`Ash.Actions.Read` (`lib/ash/actions/read/read.ex`) authorized an aggregate in two passes. `Ash.Filter.relationship_filters/7` built a policy filter for each relationship it found an aggregate reading, and `authorize_aggregate/11` looked each filter up and applied none when it found none. An aggregate the first pass did not reach ran without its destination's read policy. That covered an aggregate or calculation given as the `field:` of `Ash.aggregate/3`, the aggregates inside a calculation used as an aggregate's field, an aggregate in another aggregate's filter, sort or join filter, and an aggregate in a combination or in the sort of an atomic bulk update or destroy. `Ash.count/2`, `Ash.exists/2` and `Ash.aggregate/3` also ignored a read policy that is decided against the records, and an aggregate reached on these paths over a multitenant resource required no tenant.\n\nThis issue affects ash: from 2.17.22 before 3.39.1."}],"value":"Incorrect authorization vulnerability in Ash allows an actor to read counts, sums and attribute values of related records they cannot read via aggregates.\n\nAsh.Actions.Read (lib/ash/actions/read/read.ex) authorized an aggregate in two passes. Ash.Filter.relationship_filters/7 built a policy filter for each relationship it found an aggregate reading, and authorize_aggregate/11 looked each filter up and applied none when it found none. An aggregate the first pass did not reach ran without its destination's read policy. That covered an aggregate or calculation given as the field: of Ash.aggregate/3, the aggregates inside a calculation used as an aggregate's field, an aggregate in another aggregate's filter, sort or join filter, and an aggregate in a combination or in the sort of an atomic bulk update or destroy. Ash.count/2, Ash.exists/2 and Ash.aggregate/3 also ignored a read policy that is decided against the records, and an aggregate reached on these paths over a multitenant resource required no tenant.\n\nThis issue affects ash: from 2.17.22 before 3.39.1."}],"impacts":[{"capecId":"CAPEC-1","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>An actor who may read a record asks for an aggregate over its related records, through <code>Ash.aggregate/3</code>, a stacked aggregate, or a filter or sort on one, and receives counts, sums or attribute values of related records that their read policy hides. Filtering an aggregate on a guessed value makes it a yes or no oracle for any attribute of a hidden record.</p>"},{"base64":false,"type":"text/markdown","value":"An actor who may read a record asks for an aggregate over its related records, through `Ash.aggregate/3`, a stacked aggregate, or a filter or sort on one, and receives counts, sums or attribute values of related records that their read policy hides. Filtering an aggregate on a guessed value makes it a yes or no oracle for any attribute of a hidden record."}],"value":"An actor who may read a record asks for an aggregate over its related records, through Ash.aggregate/3, a stacked aggregate, or a filter or sort on one, and receives counts, sums or attribute values of related records that their read policy hides. Filtering an aggregate on a guessed value makes it a yes or no oracle for any attribute of a hidden record."}]}],"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:N/VA:N/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"HIGH","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-12-04T06:18:11.171Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"name":"Aggregates skip read policies on several paths: aggregate fields, Ash.aggregate query filters and runtime checks","tags":["vendor-advisory","related"],"url":"https://github.com/ash-project/ash/security/advisories/GHSA-x7q7-6hpv-55jq"},{"name":"EEF CNA record for CVE-2026-140867","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-140867.html"},{"name":"OSV record EEF-CVE-2026-140867","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-140867"},{"name":"Introducing commit a12131c in ash-project/ash","tags":["related"],"url":"https://github.com/ash-project/ash/commit/a12131cf70872e33d881c2c7c5d65cf9d2b5fb34"},{"name":"Fix commit 42ee441 in ash-project/ash","tags":["patch"],"url":"https://github.com/ash-project/ash/commit/42ee4418dfc968c1c5779dd928c878822f88a866"}],"source":{"discovery":"EXTERNAL"},"title":"Aggregates in Ash skip the read policies of the records they read on several query paths, disclosing counts and values of hidden records"}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-140867","datePublished":"2026-12-04T06:18:11.171Z","dateReserved":"2026-12-03T01:31:03.629Z","dateUpdated":"2026-12-04T06:18:11.171Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"}