[security] Mass assignment fix sweep
fix: [security] Mass assignment fix sweep
[security] Mass assignment fix sweep634f1f-fix-security-mass-assignment-fix-sweep-cve-2026-56422fixsecurity mass assignment fix sweep
Committed by iglocska
commit message
fix: [security] Mass assignment fix sweep
GalaxyClusterRelations: edit() and add() let a perm_galaxy_editor cross a
privilege/scope boundary via body-supplied scope FKs (milestone
GalaxyClusterRelations of the mass-assignment audit).
- edit(): authorised and saved the source cluster from the body
galaxy_cluster_uuid, while the relation itself was only loaded with VIEW
scope (fetchRelations). A user who could merely VIEW a relation on another
org's cluster could re-parent it onto a cluster they own (supply their own
cluster's uuid to pass the edit check), silently removing the relation from
the victim cluster - a cross-cluster relation hijack. Pinned
galaxy_cluster_uuid to the stored relation's source so both the auth check
and the saved galaxy_cluster_id derive from the relation's real owner,
matching delete() which already authorises against the stored source uuid.
Live before/after proven (org-316 editor moved org-1's relation; after fix
the edit is rejected and the row is untouched; legit owner edit still works).
- add(): distribution 4 (sharing group) did not validate SG access, letting a
galaxy editor scope a relation to a sharing group they cannot access
(editRelation() already enforces this via checkIfAuthorised). Added the same
checkIfAuthorised gate on the add path. Live-proven (SG the user has no
access to is now rejected).
- Guarded the now-reachable un-owned-source auth-failure path so the rejection
returns a clean error instead of dereferencing a missing GalaxyCluster key.
- as reported by Jeroen Pinoy
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>Editor assessment
This commit patches CVE-2026-56422. The body explains two distinct problems in GalaxyClusterRelations: edit() authorised and saved a source cluster taken from the request body, letting a user with view-only access re-parent another org's relation, and add() skipped the sharing-group access check for distribution four. It pairs each finding with the remedy, pinning the stored source uuid and adding the checkIfAuthorised gate, and notes that delete() already did the right thing. The bullet structure and live evidence make it readable despite length. The generic sweep subject and audit trailers remain.