mediumVulnerability

GHSA-jq2f-59pj-p3m3

## 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 - Craft CMS 5.6.0 through 5.9.14 (latest release at time of report) - Regression introduced in 5.6.0 when the `viewUsers` permission was added - Prior to 5.6.0, `editedUser()` required `editUsers`, which implicitly protected this endpoint - Requires Pro edition or higher (the vulnerable code path is gated by `CmsEdition::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: 1. **`actionSavePermissions()` reachable with read-only access**: The action only requires a control panel request and delegates to `editedUser()`, which now only checks `viewUsers` — a permission explicitly documented as "read-only access to user elements." 2. **Asymmetric authorization in `_saveUserGroups()`**: The method checks `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 - Attacker has a control panel account with `accessCp` and `viewUsers` permissions only - Target user belongs to one or more user groups that grant additi

Properties

ghsa_id
GHSA-jq2f-59pj-p3m3
severity
medium
summary
Craft CMS has a Missing Authorization Check on User Group Removal via save-permissions Action
cve_id
GHSA-jq2f-59pj-p3m3
is_ghsa_only
true
ghsa_published
2026-04-14T23:34:52Z
source_url
https://github.com/advisories/GHSA-jq2f-59pj-p3m3
ghsa_updated
2026-04-14T23:34:53Z

Related Entities (4)

AFFECTS (1)

[Software]composer/craftcms/cms

HAS_WEAKNESS (1)

[Weakness]Missing Authorization

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]composer/craftcms/cms

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-jq2f-59pj-p3m3 — Ninja Signal Threat Intelligence | Ninja Signal