[security] Mass assignment fix sweep

fix: [security] Mass assignment fix sweep
[security] Mass assignment fix sweep84bafe-fix-security-mass-assignment-fix-sweep-cve-2026-56422fixsecurity mass assignment fix sweep

Committed by iglocska

commit message
fix: [security] Mass assignment fix sweep

BookmarksController::edit allowed mass-assignment of the Bookmark.user_id
ownership FK. The action has no `fields` whitelist, so CRUDComponent::edit
merges every posted field onto the loaded record; Bookmark::beforeValidate
force-pins user_id only on the create branch (empty id), and M0 re-pins
only id. An injected Bookmark[user_id] therefore re-owned the bookmark to
an arbitrary victim user.
 
Impact: bookmarks ACL is ['*'] (any authenticated user, incl. read-only)
and the controller has no beforeFilter unlockedActions clobber, so the
edit sink is REST-reachable with the Security component off. A low-priv
user could create their own bookmark (add force-pins user_id), then edit
it injecting an arbitrary user_id plus attacker-controlled name/url. The
re-owned row surfaces in the victim's global navigation menu
(AppController renders Bookmark::getBookmarksForUser, whose "mine" branch
matches on user_id and ignores org_id) across orgs -> stored phishing /
malicious-link injection. Same add/edit parity class as the
GalaxyClusterRelations and Collections findings.
 
Fix: pin the editable set to ['name','url','comment','exposed_to_org']
(the form's own fields), excluding the user_id/org_id ownership FKs; id is
covered by the central CRUD edit id-pin, exposed_to_org/org_id remain
gated by beforeValidate. Live before/after proven: pre-fix an injected
Bookmark[user_id]=196 re-owned the row; post-fix it is ignored (user_id
preserved) while name/url still update.
 
Mass-assignment audit Tier B #26 (BookmarksController).
 
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

Editor assessment

This commit patches CVE-2026-56422. The body explains how BookmarksController::edit lacked a field whitelist, so CRUDComponent merged every posted field and an injected Bookmark[user_id] re-owned the row to another user. It then argues impact convincingly, describing the bookmark ACL that admits read-only users, the missing beforeFilter clobber making the sink REST-reachable, and how the re-owned row surfaces in the victim's navigation menu across orgs. The remedy, pinning the editable set to the form's four fields, is proportionate and clearly stated. The live before-and-after proof is present. It is thorough but lengthy, and the sweep subject still hides the controller.

Browse categories

More fix examples · Back to search