CVE-2026-126333: forbid_if and authorize_unless in Ash allow exactly the records a runtime check should forbid
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. scenarioappliestorecord?/3 and scenarioimpossiblebydata?/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 forbidif and authorizeunless 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.
This issue affects ash: from 3.4.44 before 3.39.0.
Affected Software
Event History
Frequently Asked Questions
Which Ash applications are exposed?
Applications using ash versions from 3.4.44 before 3.39.0 are affected when they have policies using forbid_if or authorize_unless with a runtime check that cannot be decided up front or expressed as a filter.
What access does an attacker need to exploit this?
The attacker needs to act as an actor able to invoke a read, update, or destroy operation governed by an affected policy. The authorization flaw can then expose records that the runtime check should deny.
Are write operations affected?
Yes. Update and destroy operations against forbidden records can succeed starting with ash 3.33.0; affected reads can return records that should be hidden.
How can I identify potentially affected policies?
Review policies for forbid_if and authorize_unless checks that rely on check/4 evaluation at runtime rather than checks resolvable up front or as a filter. Test whether records for which the runtime check returns true are incorrectly permitted.