Ash field policies do not filter-nil forbidden calculations and aggregates, enabling an information-disclosure oracle
ash-project ash
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ash-project ash |
| No fix yet |
| ash-project ash |
| No fix yet |
Original description
Ash field_policies are documented to protect against filter-based information disclosure: when a field the actor may not see is referenced in a filter, it is replaced with an expression that evaluates to nil, so a filter cannot be used as a yes/no oracle to read a value the actor cannot see.
This nilling was applied to attributes but not to calculations or aggregates. A user-supplied filter reference to a calculation or aggregate carries an Ash.Query.Calculation / Ash.Query.Aggregate struct, which the authorizer's reference replacement did not match (it only matched the Ash.Resource.* structs), so the filter ran against the real value.