# GHSA-82C8-2W33-XGGC: forbid\_if and authorize\_unless in Ash allow exactly the records a runtime check should forbid

- Database: GitHub
- Severity: CVSS 7.4 (High)
- Published: 2026-12-03
- Modified: 2026-12-03

## Tracked as

- [CVE-2026-126333](https://cve.now/CVE-2026-126333.md): forbid\_if and authorize\_unless in Ash allow exactly the records a runtime check should forbid

## Affected versions

- ash (Hex): from 3.4.44, fixed in 3.39.0

## Description

Incorrect Authorization vulnerability in ash-project ash allows an actor to read, update and destroy records that a policy forbids.

When a policy check cannot be decided up front or as a filter, `Ash.Policy.Authorizer` (`lib/ash/policy/authorizer/authorizer.ex`) runs its `check/4` callback, which returns the records the check is true for. `scenario_applies_to_record?/3` and `scenario_impossible_by_data?/3` only asked whether a record was among them and ignored the value the policy needed. A policy that needs the check to be false, as `forbid_if` and `authorize_unless` do, therefore allowed exactly the records the check is true for and forbade the rest. Reads returned the records they should hide, and from 3.33.0 an update or destroy of a forbidden record succeeded.

### Configurations

Reachable when a policy needs a check to be false for a record to be allowed (`forbid_if`, `authorize_unless`, or a policy condition) and that check is decided against the records: a custom check whose `strict_check/3` returns `:unknown` under `access_type :runtime`, a filter check whose `auto_filter/3` returns `:unknown`, or an `expr(...)` check that a runtime policy leaves to the records.

### Workarounds

Write the check for the opposite condition and use it with `authorize_if` or `forbid_unless`, which are decided correctly.

### Patches

Fixed in ash 3.39.0.

## References

- https://github.com/ash-project/ash/security/advisories/GHSA-82c8-2w33-xggc

Page: https://cve.now/GHSA-82C8-2W33-XGGC

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
