{"id":"CVE-2026-81316","aliases":["CVE-2026-81316","EEF-CVE-2026-81316","GHSA-v7pf-wjxc-7j5m"],"related":[],"kind":"vulnerability","state":"published","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.\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'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.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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'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.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIncorrect 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'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.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1.\n\n## Configurations\n\nAn 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).","format":"markdown","source":"eef"}],"published":"2026-08-30T11:59:41.945Z","modified":"2026-11-25T06:31:03.043Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.1,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.1,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"type":"semver","introduced":"0.1.0","fixed":"0.7.1","status":"affected"}],"vendor":"ash-project","product":"ash_sql","package":"ash_sql","cpe":"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*","repo":"https://github.com/ash-project/ash_sql","source":"cvelist"},{"ranges":[{"type":"git","introduced":"dd092ed273dec7bd2194352f24a39229fc8ae68b","fixed":"4b95468e5434a3526571414219719c9518be6694","status":"affected"}],"vendor":"ash-project","product":"ash_sql","package":"ash-project/ash_sql","cpe":"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*","repo":"https://github.com/ash-project/ash_sql","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.1.0","status":"affected","fixed":"0.7.1"}],"ecosystem":"Hex","package":"ash_sql","purl":"pkg:hex/ash_sql","source":"eef"},{"ranges":[{"type":"git","introduced":"dd092ed273dec7bd2194352f24a39229fc8ae68b","status":"affected","fixed":"4b95468e5434a3526571414219719c9518be6694"}],"repo":"https://github.com/ash-project/ash_sql","source":"eef"}],"references":[{"url":"https://github.com/ash-project/ash_sql/security/advisories/GHSA-v7pf-wjxc-7j5m","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-81316.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-81316","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ash-project/ash_sql/commit/dd092ed273dec7bd2194352f24a39229fc8ae68b","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/ash-project/ash_sql/commit/4b95468e5434a3526571414219719c9518be6694","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/ash_sql","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Zach Daniel / Ash Project"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-31T14:58:05.625Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-81316","url":"https://www.cve.org/CVERecord?id=CVE-2026-81316","licence":"CVE Terms of Use","modified":"2026-11-19T08:40:50.941Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-81316","url":"https://osv.dev/vulnerability/EEF-CVE-2026-81316","licence":"CC-BY-4.0","modified":"2026-11-25T06:31:03.043Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-81316","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-81316","licence":"Public domain","modified":"2026-11-19T09:18:02.093Z"}],"updatedAt":"2026-11-25T22:59:35.762Z","epss":{"score":0.00181,"percentile":0.08014,"date":"2026-12-01T12:00:22.000Z"}}