Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘 Packagist

GHSA-jq2f-59pj-p3m3

Fix: craftcms/cms@b135384

GHSA-jq2f-59pj-p3m3 is a security vulnerability in craftcms/cms. O3 Security confirms whether GHSA-jq2f-59pj-p3m3 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Craft CMS has a Missing Authorization Check on User Group Removal via save-permissions Action

Also known asCVE-2026-41128
Published
Apr 14, 2026
Updated
May 5, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Real-World Exposure

1 pkg affected
🐘craftcms/cms

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

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 additional permissions
  • Pro edition or higher

Attack Steps

  1. Attacker authenticates to the Control Panel
  2. Attacker sends a POST request to actions/users/save-permissions with:
    • userId = target user's ID
    • groups = `` (empty string)
  3. All group memberships for the target user are removed
  4. All permissions inherited from those groups are immediately revoked

Impact

  • Privilege revocation: An attacker can strip group-based permissions from arbitrary users, including accounts whose effective access derives from group membership
  • Denial of access: Users lose access to sections, volumes, and features that were granted through group membership
  • Bypass of elevated session requirement: Group removal does not trigger requireElevatedSession() (which is only triggered when new groups are added)

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistcraftcms/cms5.6.0&&< 5.9.155.9.15

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for craftcms/cms. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update craftcms/cms to 5.9.15 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jq2f-59pj-p3m3 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-jq2f-59pj-p3m3 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-jq2f-59pj-p3m3. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## 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 prot
O3 Security · Impact-Aware SCA

Is GHSA-jq2f-59pj-p3m3 in your dependencies?

O3 detects GHSA-jq2f-59pj-p3m3 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.