Intel

AIKIDO-2026-604951

ash_sql is vulnerable to Incorrect Authorization

Incorrect AuthorizationCVE-2026-77454 Published Yesterday

59

Medium Risk

This Affects:

ELIXIRash_sql
0.4.1 - 0.7.0
Fixed in 0.7.1
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

ash_sql is vulnerable to Incorrect Authorization in versions 0.4.1 - 0.7.0.

How to fix this

Upgrade the ash_sql library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform