Am I affected?

type your ash version to check

Description

Missing Authorization vulnerability in ash-project ash allows an actor to update records forbidden by resource policies through the atomic path of Ash.update_many/4.

Ash.update_many/4 runs as a single atomic statement (a data-layer update_many, for example a SQL MERGE) whenever an atomic strategy is used and the data layer supports it. Ash.Actions.Update.UpdateMany (lib/ash/actions/update/update_many.ex) took that path even under authorize?: true without applying the resource's policies, so the statement updated every row matched by primary key regardless of the policy filter that authorization would impose. An actor could therefore update records the policies forbid, such as rows belonging to another actor or tenant. The fix restricts the atomic path to data layers supporting changeset filters when authorizing, authorizes each changeset, and merges the resulting policy filter into each changeset so the statement only touches authorized rows.

This issue affects ash: from 3.29.0 before 3.32.2.

Weaknesses & attack patterns

Weakness

CWE-862 · Missing Authorization in catalog → MITRE ↗

Attack patterns

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

Affected — Hex / ash Hex.pm ↗ Repository ↗

3.29.0 < 3.32.2 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Actions.Update.UpdateMany'
source files lib/ash/actions/update/update_many.ex
routines 'Elixir.Ash.Actions.Update.UpdateMany':run/5

Affected — GitHub / ash-project/ash Repository ↗

45e6b4e < ed4e656 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Ash.Actions.Update.UpdateMany'
source files lib/ash/actions/update/update_many.ex
routines 'Elixir.Ash.Actions.Update.UpdateMany':run/5

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:N/VI:H/VA:N/SC:N/SI:N/SA:N
« All CVEs