{"id":"CVE-2026-77454","aliases":["EEF-CVE-2026-77454","EUVD-2026-68198","GHSA-8v9m-8pxv-738c"],"status":"published","title":"exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql","description":"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'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.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1.","severity":{"version":"4.0","score":5.9,"vector":"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00179,"percentile":0.07558,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-863"],"published":"2026-08-30T12:01:23Z","modified":"2026-10-28T02:31:03Z","fixes":[{"ecosystem":"Hex","package":"ash_sql","fixed_in":["0.7.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"ash_sql","ranges":[{"type":"SEMVER","events":[{"introduced":"0.4.1"},{"fixed":"0.7.1"}]}],"versions":["0.4.1","0.4.2","0.4.3","0.4.4","0.4.5","0.5.0","0.5.1","0.5.2","0.5.3","0.5.4","0.5.5","0.6.0","0.6.1","0.6.2","0.6.3","0.6.4","0.6.5","0.6.6","0.6.7","0.6.8","0.6.9","0.7.0"]}],"products":[{"vendor":"ash-project","product":"ash_sql"}],"references":[{"url":"https://github.com/ash-project/ash_sql/security/advisories/GHSA-8v9m-8pxv-738c","tags":["vendor-advisory","related","exploit","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-77454.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-77454","tags":["related","web"]},{"url":"https://github.com/ash-project/ash_sql/commit/865fdd4e5e70724a23b19c048e6768c31d2209ab","tags":["patch","fix"]},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77454.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77454","tags":["advisory"]},{"url":"https://github.com/ash-project/ash_sql","tags":["package"]},{"url":"https://hex.pm/packages/ash_sql","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-77454","title":"exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql","description":"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'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.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1.","status":"published","published":"2026-08-30T12:01:23.862Z","modified":"2026-08-31T15:00:02.165Z","cvss":[{"version":"4.0","score":5.9,"vector":"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","level":"medium","assessor":"cna"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T14:20:16.072351Z"}],"euvd":[{"id":"EUVD-2026-68198","description":"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'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.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1.","status":"published","published":"2026-08-30T12:01:23Z","modified":"2026-08-31T15:00:02Z","cvss":[{"version":"4.0","score":5.9,"vector":"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","level":"medium"}],"updated_at":"2026-11-02T18:01:21.100116Z"}],"nvd":[{"id":"CVE-2026-77454","description":"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'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.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1.","status":"published","published":"2026-08-30T12:17:17.273Z","modified":"2026-09-01T21:15:00.147Z","cvss":[{"version":"4.0","score":5.9,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T14:12:42.691315Z"}],"osv":[{"id":"CVE-2026-77454","title":"exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql","description":"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'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.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1.","status":"published","published":"2026-08-30T12:01:23.862Z","modified":"2026-10-28T02:31:03.307928305Z","cvss":[{"version":"4.0","score":5.9,"vector":"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","level":"medium"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T15:45:17.44708Z"},{"id":"EEF-CVE-2026-77454","title":"exists/2 predicate silently dropped on limited relationships with a parent() filter in AshSql","description":"## Summary\n\nIncorrect 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'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.\n\nThis issue affects ash_sql: from 0.4.1 before 0.7.1.\n\n## Configurations\n\nAn 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.","status":"published","published":"2026-08-30T12:01:23.862Z","modified":"2026-09-08T03:45:08.467612171Z","cvss":[{"version":"4.0","score":5.9,"vector":"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","level":"medium"}],"cwes":["CWE-863"],"updated_at":"2026-11-02T15:46:33.520522Z"}]}}
