CVE-2025-48043 — ash
Fix: ash-project/ash@4c41344CVE-2025-48043 is a CWE-863 vulnerability in ash. A fix is available for ash — see the affected versions and patch details below.
Bypass and runtime policies that can never pass may be incorrectly applied in filter authorization
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-48043.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
ashReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Hex packages — download data is not available via public APIs for these ecosystems.
Description
Summary
When using filter authorization, two edge cases could cause the policy compiler/authorizer to generate a permissive filter:
-
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, theNOT(condition)branch evaluated truthy and the overall expression became permissive. -
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 ... endblocks 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/1now treats bypass blocks asAND(condition_expression, compiled_policies)instead ofOR(AND(...), NOT(condition_expression)). This removes the permissiveNOT(condition)escape hatch when a bypass condition never passes. -
Ash.Policy.Authorizernow treats empty SAT scenarios (scenario == %{}) asfalse, ensuring impossible scenarios do not collapse into a no-op and inadvertently widen the filter. The reducer also normalizesnil→falseconsistently when buildingauto_filterfragments.
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
bypasspolicies whose conditions are only decidable at runtime and may be perpetually false in some contexts; prefer explicitauthorize_if/forbid_ifblocks withoutbypassfor 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
bypassblock withaccess_type :runtimewithout any policies after it; or - Defines
bypassblocks whose conditions are evaluated at runtime (e.g., checks withstrict_check/3returning:unknownand a runtimecheck/4that 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💧Hex | ash | all versions | 3.6.2mix deps.update ash |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ash, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update ash to 3.6.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-48043 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2025-48043 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2025-48043. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2025-48043 in your dependencies?
O3 Security finds CVE-2025-48043 across Hex dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.