Am I affected?

type your ash version to check

Description

Incorrect Authorization vulnerability in ash-project ash authorizes an aggregate under one read action while computing it under another, so an aggregate can run with policies that do not match the action it was authorized against.

Ash.Actions.Aggregate groups aggregates by their {authorize?, read_action} and authorizes each group under that read action, but when building the data query it selected the action as opts[:action] || read_action || <primary read> (lib/ash/actions/aggregate.ex). When a caller passed an :action option, the aggregate query ran under that action while authorization had been computed for the group's own read_action. If the run action's read policies are more permissive than the authorized one, the aggregate (a count or sum) is computed over records the authorized action's policies would have excluded, disclosing information about data the actor cannot read. The fix runs the aggregate under the same read_action it is authorized against.

This issue affects ash: from 3.5.13 before 3.32.2.

Weaknesses & attack patterns

Weakness

CWE-863 · Incorrect Authorization in catalog → MITRE ↗

Attack patterns

CAPEC-1 · Accessing Functionality Not Properly Constrained by ACLs MITRE ↗

Affected — Hex / ash Hex.pm ↗ Repository ↗

3.5.13 < 3.32.2 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Actions.Aggregate'
source files lib/ash/actions/aggregate.ex
routines 'Elixir.Ash.Actions.Aggregate':run/4

Affected — GitHub / ash-project/ash Repository ↗

d2e9998 < 2d9b78b affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Actions.Aggregate'
source files lib/ash/actions/aggregate.ex
routines 'Elixir.Ash.Actions.Aggregate':run/4

References

Credits

Jonatan Männchen / EEF Coordinator
Zach Daniel / Ash Project Remediation developer
Peter Ullrich Reporter Finder

CVSS breakdown

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
« All CVEs