Ash has authorization bypass when bypass policy condition evaluates to true
Bypass policies incorrectly authorize requests when their condition evaluates to true but their authorization checks fail and no other policies apply.
Resources with bypass policies can be accessed without proper authorization when:
Vulnerable code in: [lib/ash/policy/policy.ex:69](https://github.com/ash-project/ash/blob/b2e4d625/lib/ash/policy/policy.ex#L69)
```elixir
{%{bypass?: true}, cond_expr, complete_expr}, {one_condition_matches, all_policies_match} ->
{
b(cond_expr or one_condition_matches), # <- Bug: uses condition only
b(complete_expr or all_policies_match)
}
```
The final authorization decision is: one_condition_matches AND all_policies_match
When a bypass condition is true but bypass policies fail, and subsequent policies have non-matching conditions:
1. one_condition_matches = cond_expr (bypass condition) = true (bug - should check if bypass actually authorizes)
2. all_policies_match = (complete_expr OR NOT cond_expr) for each policy
(false OR NOT false) = true (policies don't apply)3. Final: true AND true = true (incorrectly authorized)
The bypass condition alone satisfies "at least one policy applies" even though the bypass fails to authorize.
Replace cond_expr with complete_expr on line 69:
```elixir
{%{bypass?: true}, _cond_expr, complete_expr}, {one_condition_matches, all_policies_match} ->
{
b(complete_expr or one_condition_matches), # <- Fixed
b(complete_expr or all_policies_match)
}
```
Line 52 should also be updated for consistency (though it's only triggered when bypass is the last policy, making it coincidentally safe in practice):
```elixir
{%{bypass?: true}, _cond_expr, complete_expr}, {one_condition_matches, true} ->
{
b(complete_expr or one_condition_matches), # <- For consistency
complete_expr
}
```
```elixir
policies do
bypass always() do
authorize_if actor_attribute_equals(:is_admin, true)
end
policy action_type(:read) do
authorize_if always()
end
end
```
Non-admin user can perform create actions (should be denied).
Test demonstrating the bug:
```elixir
test "bypass policy bug" do
policies = [
%Ash.Policy.Policy{
bypass?: true,
condition: [{Ash.Policy.Check.Static, result: true}], # condition = true
policies: [
%Ash.Policy.Check{
type: :authorize_if,
check: {Ash.Policy.Check.Static, result: false}, # policies = false
check_module: Ash.Policy.Check.Static,
check_opts: [result: false]
}
]
},
%Ash.Policy.Policy{
bypass?: false,
condition: [{Ash.Policy.Check.Static, result: false}],
policies: [
%Ash.Policy.Check{
type: :authorize_if,
check: {Ash.Policy.Check.Static, result: true},
check_module: Ash.Policy.Check.Static,
check_opts: [result: true]
}
]
}
]
expression = Ash.Policy.Policy.expression(policies, %{})
assert expression == false
# Expected: false (deny)
# Actual on main: true (incorrectly authorized)
end
```
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. Rated impact: confidentiality high, integrity high, availability none.
The score comes from this 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
CVE-2025-48044 is classified as CWE-863: Incorrect Authorization. An authorisation check runs but reaches the wrong conclusion, permitting actions it should refuse.
CVE-2025-48044 is recorded against 2 packages.
Published on 17 October 2025 and last revised on 30 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
cna.erlef.org (Web)
github.com (Package)
osv.dev (Web)
ash has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-863: Incorrect Authorization) in other software:
Details
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
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| ash | — | — |
| unknown | — | — |
References
Similar Threats
Site Security Check
CVE-2025-48044 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.