CVE-2025-48043: Bypass and runtime policies that can never pass may be incorrectly applied in filter authorization
Summary
When using filter authorization, two edge cases could cause the policy compiler/authorizer to generate a permissive filter:
1. Bypass policies whose condition can never pass at runtime were compiled as OR(AND(condition, compiledpolicies), NOT(condition)). If the condition could never be true at runtime, the NOT(condition) branch evaluated truthy and the overall expression became permissive.
2. 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.
These bugs could allow reads to return records that should have been excluded by policy.
Impact
Projects that rely on filter-based authorization and define:
bypass ... do ... end blocks whose condition(s) are only resolvable at runtime and can never pass in a given request context, or runtime checks that simplify to an empty scenario for a clause
may unintentionally generate a permissive query filter, potentially returning unauthorized data.
Actions primarily affected: reads guarded by filter policies. Non-filter (e.g., hard forbid) policies are not impacted.
Technical details
This patch corrects two behaviors:
Ash.Policy.Policy.compilepolicyexpression/1 now treats bypass blocks as AND(conditionexpression, compiledpolicies) instead of OR(AND(...), NOT(conditionexpression)). This removes the permissive NOT(condition) escape hatch when a bypass condition never passes.
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 autofilter fragments.
Relevant changes are in:
lib/ash/policy/policy.ex (bypass compilation) lib/ash/policy/authorizer/authorizer.ex (scenario handling / autofilter normalization) Tests added: test/policy/filterconditiontest.exs (RuntimeFalsyCheck, RuntimeBypassResource) validate the corrected behavior.
Workarounds
Avoid bypass policies whose conditions are only decidable at runtime and may be perpetually false in some contexts; prefer explicit authorizeif/forbidif blocks without bypass for those cases. Add an explicit final forbidif always() guard for sensitive reads as a belt-and-suspenders fallback until user can upgrade. Where feasible, replace runtime-unknown checks with strict/compile-time checks or restructure to avoid empty SAT scenarios.
How to tell if user is affected
User is likely affected if ALL of the following are true:
Uses filter authorization; and Defines bypass block with accesstype :runtime without any policies after it; or Defines bypass blocks whose conditions are evaluated at runtime (e.g., checks with strictcheck/3 returning :unknown and a runtime check/4 that may never succeed in some contexts) without any policies after it
A 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.
Other sources
Incorrect Authorization vulnerability in ash-project ash allows Authentication Bypass. This vulnerability is associated with program files lib/ash/policy/authorizer/authorizer.ex and program routines 'Elixir.Ash.Policy.Authorizer':strictfilters/2.
This issue affects ash: from 0.1.0 before 3.6.2.
— MITRE
Incorrect Authorization vulnerability in ash-project ash allows Authentication Bypass. This vulnerability is associated with program files lib/ash/policy/authorizer/authorizer.ex and program routines 'Elixir.Ash.Policy.Authorizer':strictfilters/2.
This issue affects ash: from pkg:hex/ash@0 before pkg:hex/ash@3.6.2, before 3.6.2, before 66d81300065b970da0d2f4528354835d2418c7ae.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
erlang/ashto a version that resolves this vulnerability.Fixed in 3.6.2 - Upgrade
Upgrade
ashto a version that resolves this vulnerability.Fixed in 3.6.2Patch 66d81300065b970da0d2f4528354835d2418c7ae - Configuration
Update the authorization logic so that empty SAT scenarios (scenario == %{}) are treated as false, preventing impossible scenarios from collapsing into a permissive filter.
Ash.Policy.Authorizer (scenario handling / auto_filter normalization) empty SAT scenario handling (scenario == %{}) = Treat as false (do not reduce to empty/no-op) - Configuration
Ensure policy compilation removes the permissive NOT(condition) escape hatch when bypass conditions never pass at runtime (i.e., avoid treating no-check situations as permissive).
Ash.Policy.Policy.compile_policy_expression/1 (bypass compilation) bypass block compilation when bypass can never pass = Do not produce permissive NOT(condition) escape hatch - Configuration
Add an explicit final `forbid_if always()` guard for sensitive reads as a belt-and-suspenders fallback until you upgrade.
Filter-based authorization policies final guard for sensitive reads = forbid_if always() - Configuration
Avoid `bypass` blocks whose conditions are evaluated at runtime (e.g., checks that may return `:unknown` via `strict_check/3` and a runtime `check/4` that may never succeed); prefer explicit `authorize_if`/`forbid_if` blocks without `bypass` for those cases.
Filter-based authorization policies bypass block usage with runtime-unknown conditions = Avoid bypass policies whose conditions are only decidable at runtime - Compensating control
Do a quick sanity test: issue a read expected to return no rows under the affected bypass/runtime-falsy condition and verify it returns `[]`.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-48043?
CVE-2025-48043 has a high severity rating due to the potential for authentication bypass.
How do I fix CVE-2025-48043?
To fix CVE-2025-48043, upgrade ash to version 3.6.3 or later.
What software is affected by CVE-2025-48043?
CVE-2025-48043 affects ash-project ash versions up to 3.6.2.
What type of vulnerability is CVE-2025-48043?
CVE-2025-48043 is classified as an Incorrect Authorization vulnerability.
Can CVE-2025-48043 lead to security breaches?
Yes, CVE-2025-48043 may allow unauthorized users to bypass authentication, potentially leading to significant security breaches.