{"id":"CVE-2025-48043","aliases":["CVE-2025-48043","GHSA-7r7f-9xpj-jmr7","EEF-CVE-2025-48043"],"related":[],"kind":"vulnerability","state":"published","title":"Bypass and runtime policies that can never pass may be incorrectly applied in filter authorization","summary":"Incorrect Authorization vulnerability in ash-project ash allows Authentication Bypass.\n\nThis issue affects ash: from 0.1.1 before 3.6.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Incorrect Authorization vulnerability in ash-project ash allows Authentication Bypass.\n\nThis issue affects ash: from 0.1.1 before 3.6.2.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nWhen using **filter** authorization, two edge cases could cause the policy compiler/authorizer to generate a permissive filter:\n\n1. **Bypass policies whose condition can never pass at runtime** were compiled as\n   `OR(AND(condition, compiled_policies), NOT(condition))`.\n   If the condition could never be true at runtime, the `NOT(condition)` branch evaluated truthy and the overall expression became permissive.\n\n2. **Runtime policy scenarios that reduce to “no checks are applicable”** (an empty SAT scenario) were treated as an empty clause and dropped instead of being treated as **`false`**, which could again produce an overly broad (permissive) filter.\n\nThese bugs could allow reads to return records that should have been excluded by policy.\n\n### Impact\n\nProjects that rely on **filter-based authorization** and define:\n\n* `bypass ... do ... end` blocks whose condition(s) are only resolvable at runtime and can never pass in a given request context, **or**\n* runtime checks that simplify to an **empty** scenario for a clause\n\nmay unintentionally generate a permissive query filter, potentially returning unauthorized data.\n\n*Actions primarily affected:* reads guarded by filter policies. Non-filter (e.g., hard forbid) policies are not impacted.\n\n### Technical details\n\nThis patch corrects two behaviors:\n\n* **`Ash.Policy.Policy.compile_policy_expression/1`** now treats **bypass** blocks as\n  `AND(condition_expression, compiled_policies)`\n  instead of `OR(AND(...), NOT(condition_expression))`. This removes the permissive `NOT(condition)` escape hatch when a bypass condition never passes.\n\n* **`Ash.Policy.Authorizer`** now treats **empty SAT scenarios** (`scenario == %{}`) as **`false`**, ensuring impossible scenarios do not collapse into a no-op and inadvertently widen the filter. The reducer also normalizes `nil` → `false` consistently when building `auto_filter` fragments.\n\nRelevant changes are in:\n\n* `lib/ash/policy/policy.ex` (bypass compilation)\n* `lib/ash/policy/authorizer/authorizer.ex` (scenario handling / auto_filter normalization)\n* Tests added: `test/policy/filter_condition_test.exs` (`RuntimeFalsyCheck`, `RuntimeBypassResource`) validate the corrected behavior.\n\n### Workarounds\n\n* Avoid `bypass` policies whose conditions are only decidable at runtime and may be perpetually false in some contexts; prefer explicit `authorize_if`/`forbid_if` blocks without `bypass` for those cases.\n* Add an explicit **final `forbid_if always()`** guard for sensitive reads as a belt-and-suspenders fallback until user can upgrade.\n* Where feasible, replace runtime-unknown checks with strict/compile-time checks or restructure to avoid empty SAT scenarios.\n\n### How to tell if user is affected\n\nUser is likely affected if ALL of the following are true:\n\n*  Uses **filter authorization**; and\n* Defines `bypass` block with `access_type :runtime` without any policies after it; or\n* Defines `bypass` blocks whose conditions are evaluated at runtime (e.g., checks with `strict_check/3` returning `:unknown` and a runtime `check/4` that may never succeed in some contexts) without any policies after it\n\nA quick sanity test is to issue a read expected to return **no** rows under such a bypass or runtime-falsy condition and verify it indeed returns `[]`. The included test `bypass works with filter policies` demonstrates the corrected, non-permissive behavior.","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nIncorrect Authorization vulnerability in ash-project ash allows Authentication Bypass.\n\nThis issue affects ash: from 0.1.1 before 3.6.2.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de autorización incorrecta en ash-project ash permite la omisión de autenticación. Esta vulnerabilidad está asociada con los archivos de programa lib/ash/policy/authorizer/authorizer.ex y las rutinas de programa 'Elixir.Ash.Policy.Authorizer':strict_filters/2. Este problema afecta a ash: desde pkg:hex/ash@0 antes de pkg:hex/ash@3.6.2, antes de 3.6.2, antes de 66d81300065b970da0d2f4528354835d2418c7ae.","source":"nvd"}],"published":"2025-10-10T15:57:29.225Z","modified":"2026-11-25T06:30:06.173Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"type":"semver","introduced":"0.1.1","fixed":"3.6.2","status":"affected"}],"vendor":"ash-project","product":"ash","package":"ash","cpe":"cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*","repo":"https://github.com/ash-project/ash","source":"cvelist"},{"ranges":[{"type":"git","introduced":"4c41344126b0aba09ec3085517000f8aefec299e","fixed":"66d81300065b970da0d2f4528354835d2418c7ae","status":"affected"}],"vendor":"ash-project","product":"ash","package":"ash-project/ash","cpe":"cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*","repo":"https://github.com/ash-project/ash","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.6.2"}],"ecosystem":"Hex","package":"ash","purl":"pkg:hex/ash","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.1.1","status":"affected","fixed":"3.6.2"}],"ecosystem":"Hex","package":"ash","purl":"pkg:hex/ash","source":"eef"},{"ranges":[{"type":"git","introduced":"4c41344126b0aba09ec3085517000f8aefec299e","status":"affected","fixed":"66d81300065b970da0d2f4528354835d2418c7ae"}],"repo":"https://github.com/ash-project/ash","source":"eef"}],"references":[{"url":"https://github.com/ash-project/ash/security/advisories/GHSA-7r7f-9xpj-jmr7","tags":["advisory","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2025-48043.html","tags":["related","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2025-48043","tags":["related","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ash-project/ash/commit/4c41344126b0aba09ec3085517000f8aefec299e","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/ash-project/ash/commit/66d81300065b970da0d2f4528354835d2418c7ae","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-48043","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ash-project/ash","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/ash-project/ash/releases/tag/v3.6.2","tags":["web"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/ash","tags":["package"],"sources":["eef"]}],"credits":["Jonatan Männchen / EEF","Zach Daniel"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-10-10T16:33:21.270Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-48043","url":"https://www.cve.org/CVERecord?id=CVE-2025-48043","licence":"CVE Terms of Use","modified":"2026-11-19T08:27:03.117Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7r7f-9xpj-jmr7","url":"https://github.com/advisories/GHSA-7r7f-9xpj-jmr7","licence":"CC-BY-4.0","modified":"2026-04-06T23:34:37.448Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2025-48043","url":"https://osv.dev/vulnerability/EEF-CVE-2025-48043","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:06.173Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-48043","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-48043","licence":"Public domain","modified":"2026-10-19T16:10:00.260Z"}],"updatedAt":"2026-11-25T22:59:05.764Z","epss":{"score":0.00462,"percentile":0.41689,"date":"2026-12-01T12:00:22.000Z"}}