fix(security): prevent privilege escalation through team settings - #654
Merged
Conversation
Raise the Filament floor to ^4.12 on the admin package so installs always get the form and table rendering optimizations shipped in v4.12.0, which ^4.11 did not guarantee. Two patch level floors are required rather than cosmetic: - spatie/laravel-medialibrary ^11.23.3 fixes a single file collection dropping the media that was just added instead of the previous one. Shopper declares singleFile on the thumbnail collection. - livewire/blaze ^1.0.14 fixes conditional slots being rendered even when their condition is false. The remaining bumps align the floor with the installed minor version.
Any user holding access_setting could reach every write action on the team settings and leave with more privileges than they came in with: mint a new permission, self assign it, grant themselves permissions over unrelated resources, edit the administrator role, or create a new administrator account. Every other permission in the panel collapsed into that single one. The gates stay on view_users and access_setting. What changes is what a non administrator is allowed to do once inside: - the administrator role can no longer be opened, updated, deleted, or assigned to a new team member - a permission can only be granted to a role if the acting user holds that permission themselves - creating or deleting a permission definition is restricted to administrators removePermission now honours can_be_removed on the server. The guard only existed in the Blade view, so a crafted request could delete a permission the panel depends on and lock everyone out. The access_setting seeder description said the permission only allowed viewing the settings page, which never matched what it gates.
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Settings/Teamwrite actions are gated onaccess_setting, the general purpose settings permission granted to anyone who configures currencies, taxes, zones or legal pages. It carries no relationship to user or role management, yet holding it was enough to take over the RBAC system.A non administrator holding it could:
createPermission, which immediately assigns it to the role being editedgeneratePermissionsand receive them allRolePermissionfor the administrator role itself, since the route binds{role}with no scoping, and update or delete itPermissions::togglePermission()CreateTeamMember, since the role options only excluded the customer roleThe net effect is that every permission in the panel collapsed into
access_setting. Granting it to let someone configure shipping also granted them a path to full administrator capability. This reproduces the impact of CVE-2026-47744, whose published fix describes amanage_userspermission that has never existed in the source tree.Permissions::removePermission()had a second, unrelated defect: thecan_be_removedguard existed only in the Blade view. A crafted Livewire request could deleteaccess_settingoraccess_dashboardand lock every user out of the panel.Fix
No new permission, no migration, nothing to run on upgrade. The gates stay on
view_usersfor reads andaccess_settingfor writes. What changes is what a non administrator may do once inside.Three rules, in
Shopper\Traits\AuthorizesTeamManagement:Administrators are unaffected: they hold every permission and every rule short circuits for them.
removePermission()now checkscan_be_removedon the server before deleting.The seeder description for
access_settingsaid the permission only allowed viewing the settings page. It has never matched what the permission gates, and that mismatch is what made the original report read the situation as a read only permission guarding writes.Behaviour change
A non administrator who was creating permissions or editing the administrator role through
access_settingloses that ability. Everything else they could do in the settings area is unchanged, and no existing permission assignment is modified.Dependencies
The first commit carries the
composer update -Wfrom the same session. The Filament floor moves from^4.11to^4.12on the admin package so installs are guaranteed the form and table rendering optimizations shipped in v4.12.0.spatie/laravel-medialibrarymoves to^11.23.3for the single file collection fix that affects the thumbnail collection, andlivewire/blazeto^1.0.14for conditional slots being rendered unconditionally.