craftcms/cms
Affected
- introduced
5.6.0, fixed5.9.15(ecosystem)
Fixed versions
5.9.15
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2026-41128
Craft CMS has a Missing Authorization Check on User Group Removal via save-permissions Action
Summary
The actionSavePermissions() endpoint allows a user with only viewUsers permission to remove arbitrary users from all user groups. While _saveUserGroups() enforces per-group authorization for additions, it performs no equivalent authorization check for removals, so submitting an empty groups value removes all existing group memberships.
Affected Versions
viewUsers permission was addededitedUser() required editUsers, which implicitly protected this endpointCmsEdition::Pro)Vulnerability Details
Root Cause
This is a regression introduced in Craft CMS 5.6.0 when the viewUsers permission was added. Before that change, editedUser() required editUsers permission for accessing other users’ data, which implicitly protected actionSavePermissions(). After the change, actionSavePermissions() became reachable for users with read-only access to other users, but the underlying group-saving logic still lacked authorization for group removals.
The vulnerability has two components:
editedUser(), which now only checks viewUsers — a permission explicitly documented as "read-only access to user elements."assignUserGroup permission only when adding a user to a new group. When the groups parameter is an empty string (resulting in an empty array), the loop is skipped entirely, no authorization checks are run, and all group memberships are removed.Prerequisites
accessCp and viewUsers permissions onlyAttack Steps
actions/users/save-permissions with:userId = target user's IDgroups = `` (empty string)Impact
requireElevatedSession() (which is only triggered when new groups are added)Medium Basis: The source's own band: MODERATE
5.6.0, fixed 5.9.15 (ecosystem)5.9.15
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0