CVE-2025-48043: Ash Framework Filter Authorization Misapplies Impossible Bypass/runtime Vulnerability

HIGH
Advisory Identifier: GHSA-7r7f-9xpj-jmr7
CWE-863
Published
Advisory Summary

CVE-2025-48043 is a HIGH filter authorization misapplies impossible bypass/runtime vulnerability (CWE-863: Incorrect Authorization) affecting Ash Framework libraries in the Hex ecosystem. The issue involves filter authorization misapplies impossible bypass/runtime policies. Remediation is available by upgrading affected packages to version 3.6.2.

CVE-2025-48043 at a Glance

CVE Identifier CVE-2025-48043
GHSA Identifier GHSA-7r7f-9xpj-jmr7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-863: Incorrect Authorization
Affected Product Ash Framework
Package Ecosystem Hex
Published Date
Last Updated

How to Fix CVE-2025-48043

To remediate this vulnerability, upgrade all affected Ash Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ash fixed: 3.6.2
Upgrade ash to 3.6.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for ash

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-48043, inspect your project dependencies for Ash Framework:

inspect dependencies for ash

Analyze the terminal output to locate any version of Ash Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Ash Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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, compiled_policies), 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.compile_policy_expression/1`** now treats **bypass** blocks as `AND(condition_expression, compiled_policies)` instead of `OR(AND(...), NOT(condition_expression))`. 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 `auto_filter` fragments. Relevant changes are in: * `lib/ash/policy/policy.ex` (bypass compilation) * `lib/ash/policy/authorizer/authorizer.ex` (scenario handling / auto_filter normalization) * Tests added: `test/policy/filter_condition_test.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 `authorize_if`/`forbid_if` blocks without `bypass` for those cases. * Add an explicit **final `forbid_if 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 `access_type :runtime` without any policies after it; or * 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 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.

CVE-2025-48043 Affected Ash Framework Versions

1 component(s)
Fixed Versions:
3.6.2
Product / Package Ecosystem Affected Versions Fixed Version
ash
Hex
< 3.6.2
3.6.2

References

Frequently Asked Questions

What is CVE-2025-48043?
CVE-2025-48043 is a security vulnerability in Ash Framework involving Filter authorization misapplies impossible bypass/runtime policies under CWE-863: Incorrect Authorization.
Which Ash Framework versions are affected?
Affected versions include releases prior to 3.6.2 across affected packages: ash.
What version fixes CVE-2025-48043?
Upgrading to 3.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ash affected?
Yes, ash is affected in releases prior to 3.6.2. Upgrade your dependency to 3.6.2 or later.
What CWE is associated with CVE-2025-48043?
CVE-2025-48043 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Hex dependencies for CVE-2025-48043?
Run the dependency tree command: 'inspect dependencies for ash'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7r7f-9xpj-jmr7",
  "modified" : "2026-04-06T23:15:07Z",
  "published" : "2025-10-13T13:33:22Z",
  "aliases" : [ "CVE-2025-48043" ],
  "summary" : "Ash Framework: Filter authorization misapplies impossible bypass/runtime policies",
  "details" : "### 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.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "ash"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ash-project/ash/security/advisories/GHSA-7r7f-9xpj-jmr7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48043"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ash-project/ash/commit/66d81300065b970da0d2f4528354835d2418c7ae"
  }, {
    "type" : "WEB",
    "url" : "https://cna.erlef.org/cves/CVE-2025-48043.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ash-project/ash"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ash-project/ash/releases/tag/v3.6.2"
  }, {
    "type" : "WEB",
    "url" : "https://osv.dev/vulnerability/EEF-CVE-2025-48043"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-13T13:33:22Z",
    "nvd_published_at" : "2025-10-10T16:15:52Z"
  }
}