Loading a through relationship with a limit of 1 in Ash ignores the through path and returns unrelated destination records
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 3.37.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
The Ash framework (the ash-project "ash" Elixir library) is affected, specifically its handling of relationship loads declared with a through path. When such a relationship is loaded with a limit of 1, the framework can return destination records unrelated to the source record, bypassing the intended relationship filter, which can let a client read data it should not be able to reach through that relationship.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Incorrect Authorization vulnerability in ash-project ash allows a client to read destination records unrelated to the source record through a through relationship. When a has_many relationship declared with through: was loaded for a single record with a limit of 1, or an unsorted has_one through relationship was loaded with a limit of 1, lateral_join?/4 in lib/ash/actions/read/relationships.ex chose the path that reads the destination without any filter linking it to the source. The load returned the first destination record by sort, or any other record with an offset. The read still runs the destination's policies but carries the relationship as accessing_from, so a client paging such a field (for example teachers(limit: 1, offset: n) through AshGraphql) can enumerate destination records that policies allow only when reached through that relationship. This issue affects ash: from 3.24.0 before 3.37.1.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- ash
From 3.24.0 · fixed in 3.37.1
- ash-project/ash
From 24f41e23dcbd9d07cde270a8141490e8f79251f5 · fixed in e37463307304b26bc8fd606322e5c4d8f7f060e5
- ashHex
From 3.24.0 · fixed in 3.37.1