chore(deps): update dependency ash to v3.37.2 [security] #638
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
local-it/mitgliederverwaltung!638
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/hex-ash-vulnerability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
3.36.1→3.37.2Loading a through relationship with a limit of 1 in Ash ignores the through path and returns unrelated destination records
CVE-2026-114214 / EEF-CVE-2026-114214 / GHSA-g2h4-xp57-q863
More information
Details
Summary
Incorrect Authorization vulnerability in ash-project ash allows a client to read destination records unrelated to the source record through a
throughrelationship.When a
has_manyrelationship declared withthrough:was loaded for a single record with a limit of 1, or an unsortedhas_onethroughrelationship was loaded with a limit of 1,lateral_join?/4inlib/ash/actions/read/relationships.exchose 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 anoffset. The read still runs the destination's policies but carries the relationship asaccessing_from, so a client paging such a field (for exampleteachers(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.
Impact
A client paging a through relationship field with a limit of 1 reads destination records that should only be reachable through that relationship.
Configurations
Reachable when a
throughrelationship is loaded for a single record with a caller-controlled limit of 1 (and optionally an offset), for example through AshGraphql relationship field arguments, and the destination resource's read policies rely on the relationship (accessing_from) or are otherwise open to the caller.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV.
An upsert on the primary key in Ash ignores attribute multitenancy, so one tenant can read, overwrite and take over another tenant's records
CVE-2026-96581 / EEF-CVE-2026-96581 / GHSA-vw7c-67pf-gh96
More information
Details
Summary
Authorization Bypass Through User-Controlled Key vulnerability in ash-project ash allows a user of one tenant to read, overwrite and take over another tenant's records via an upserting create action.
Under attribute multitenancy,
Ash.Actions.Create(lib/ash/actions/create/create.ex) andAsh.Actions.Create.Bulk(lib/ash/actions/create/bulk.ex) upserted on the primary key, or on anall_tenants?identity, without scoping the conflicting record to the request's tenant. A caller of a create action withupsert? truethat accepts the primary key, supplying a record id from another tenant, updated that record's upsert fields and received all of its attributes in the result. With the default upsert fields the tenant attribute was written too, moving the record into the caller's tenant. Read and update policies do not run for upserts, and tenant-scoped create policies pass because the tenant is the caller's own.This issue affects ash: from 1.22.0 before 3.37.2.
Impact
A signed-in user of one tenant posts another tenant's record id to an upserting create action, receives that record's attributes, overwrites its upsert fields, and with the default upsert fields moves it into their own tenant.
Workarounds
Add
upsert_condition expr(<tenant attribute> == ^tenant())to every create action that upserts on the primary key or on anall_tenants?identity, and do not combine it withreturn_skipped_upsert?. An upsert into another tenant's record then fails withAsh.Error.Changes.StaleRecord(or is skipped in a bulk create) and leaves that record unchanged. This does not help on the Mnesia data layer, which ignores upsert conditions in affected versions.Configurations
Reachable when a resource uses attribute multitenancy and exposes to callers of one tenant a create action with
upsert? truethat either upserts on the primary key (noupsert_identity) and accepts it, or upserts on anall_tenants?identity, and the caller knows or can enumerate a key belonging to another tenant (for example a serial integer id, or an id from a shared link or export).Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV.
Release Notes
ash-project/ash (ash)
v3.37.2Compare Source
Bug Fixes:
don't crash a bulk create when an upsert it runs singly is skipped by @zachdaniel
[security] scope upserts to the tenant under attribute multitenancy (CVE-2026-96581, GHSA-vw7c-67pf-gh96) by @zachdaniel
v3.37.1Compare Source
Improvements:
support maps as tuple inputs by @zachdaniel
add
Ash.unpaginated_readby @zachdanielsupport
strict?: trueon changesets for strict loading by @zachdanielBug Fixes:
wait for an ETS table manager to exit when stopping its table by @zachdaniel
let a contended Mnesia transaction wait instead of failing (#3084) by Aaron Paterson (#3084)
wait for an ETS table's manager to create the table (#3083) by Aaron Paterson (#3083)
return the results of a Mnesia aggregate query (#3085) by Aaron Paterson (#3085)
load before destroying records in streaming bulk destroys by @zachdaniel
don't require original data for atomic bulk actions that won't notify by @zachdaniel
apply an upsert_condition passed to Ash.create by @zachdaniel
keep an aggregate query's arguments when authorizing its relationship path by @zachdaniel
try every operator signature before reporting a cast error by @zachdaniel
don't store :ok as a notification when a managed belongs_to fails in bulk actions by @zachdaniel
return errors from cascade_destroy and after_batch hooks instead of raising by @zachdaniel
apply the smaller of a relationship's limit and its query's limit by @zachdaniel
honor requested strategies when bulk update authorization needs initial data by @zachdaniel
[security] always lateral join through relationships (CVE-2026-114214, GHSA-g2h4-xp57-q863) by @zachdaniel
do not choose
atomic_batchesstrategy incorrectly by @zachdanielhonor
skip_unknown_inputsconstraint on embeddable types by @zachdanielhandle expression calculations in simulating calculation loading by @zachdaniel
make the lack of support for
pathoption explicit inAsh.aggregateby @zachdanielinclude expr & expr_type in unique name for inline aggregates by @zachdaniel
always select temporal period as its needed for loading by @zachdaniel
ensure that changeset.tenant is set on upgraded changesets by @zachdaniel
don't raise on a non-bang
get_bycall by @zachdanielensure multiple unrelated aggregate authorizations don't conflate by @zachdaniel
ensure aggregate multitenancy is passed everywhere by @zachdaniel
apply operator overloads more strictly only on known matches by @zachdaniel
ensure that upsert_conflict/1 expression is properly typed by @zachdaniel
ensure stream bulk actions apply changeset filter by @zachdaniel
ensure atomic upgrade uses same transaction semantics as normal update by @zachdaniel
read each step of a through relationship the way its relationship reads by @zachdaniel
handle sigils in expressions more gracefully by @zachdaniel
v3.37.0Compare Source
Features:
authorize? trueby @zachdanielImprovements:
sign keyset pagination cursors (#3038) by Ahatch3 (#3038)
document loading the same relationship and its effects (#3034) by Mckay Hinds (#3034)
Bug Fixes:
discard queued notifications when a transaction ends in a throw or exit (#3054) by @Torkan (#3054)
don't produce "not in allowed" error for
nilenum value in atomics by @zachdanielget relationship paths from custom expressions by @zachdaniel
honor
as_ofrange in temporal bulk updates and destroys (#3051) by @yosalama (#3051)keep each version's values when loading onto temporal records (#3052) by @yosalama (#3052)
ensure that
authorize?option doesn't conflict on calc dep loads by @zachdanielensure reread uses
as_ofinstead of producing stale error (#3048) by @manuganji (#3048)preserve compiler environment for namespaced interfaces (#3047) by jeffhuen (#3047)
don't reuse the stored timestamp for a record for destroying by @zachdaniel
enable composite types to act as maps in queries and calculations (#3045) by Nöl (#3045)
allow present at_least/at_most validations on atomic updates (#3044) by BBopsCode (#3044)
don't use read action to find parent() referenced rows in ets by @zachdaniel
select "selected by default" attributes for bulk destroy by @zachdaniel
declare boolean return types for contains/2 (#3042) by leonqadirie (#3042)
retry failed NewType array item casts as nil for empty strings by leonqadirie (#3042)
keep tuple field positions when loading stored values by leonqadirie (#3042)
return an error when loading undeclared composite fields by leonqadirie (#3042)
leave composite values unchanged when they lack a loaded field by leonqadirie (#3042)
reject duplicate and non-list fields in composite type init by leonqadirie (#3042)
check tuple size and report every invalid field in tuple constraints by leonqadirie (#3042)
collect exception errors from every invalid struct field by leonqadirie (#3042)
name the failing field in Map, Keyword and Tuple cast errors by leonqadirie (#3042)
format composite constraint errors like cast errors by leonqadirie (#3042)
include return_query? tuples and error returns in read, page and apply_to specs (#3041) by Łukasz Samson (#3041)
correct specs for page_opts, load, refute_has_error and Policy.solve (#3040) by Łukasz Samson (#3040)
various issues with sort + aggregate type determination by @zachdaniel
preserve related records when loading forbidden relationships (#3039) by MiGoYAm (#3039)
move elixir version requirement to 1.17 by @zachdaniel
drain pending calculations before returning an error (#3035) by Jake Schurch (#3035)
validate calculation arguments once and preserve input errors (#3031) by Barnabas Jovanovics (#3031)
properly set tenant on all action results by @zachdaniel
fail atomic changes with their errors instead of crashing (#3033) by @Torkan (#3033)
Performance Improvements:
further optimize expression caching by @zachdaniel
policy: specialize fallback expressions for known actions (#3036) by Jake Schurch (#3036)
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
Pull request closed