ash_sql is vulnerable to Incorrect Authorization
59
Medium Risk
The AshSql.Join.limit_from_many/5 function builds the subquery for relationships used inside exists/2 filters. When a relationship declares both a limit and a parent(...) referencing filter or sort, the function takes a branch that drops both the limit and the predicate and returns the bare query. The generated SQL EXISTS clause then matches any record that has any related row, so authorization policies written as exists(relationship, predicate) silently pass for any actor with any related row. The fix applies the predicate to the subquery even when the limit and parent(...) combination is present.
You are affected if you are using a version that falls within the vulnerable range and you use exists/2 filters or authorization policies on relationships that combine a limit with a parent(...) filter or sort.
ash_sql is vulnerable to Incorrect Authorization in versions 0.4.1 - 0.7.0.
Upgrade the ash_sql library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.