-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"Shopper 2.8.0 fixes CVE-2026-47744 by adding `$this->authorize('access_setting')` to write actions in two Livewire files under `packages/admin/src/Livewire/Pages/Settings/Team/`. The commit, PR #511, lands on May 11, 2026. The next security commit on the same folder lands five days later: PR #514, titled \"close remaining authorization gaps in team settings.\" It gates three more write paths on the same `access_setting` permission, against the same low-privilege escalation, against the same `view_users` read-only gate that PR #511 left in place. One of the three is a method inside a file PR #511 had already edited.\n\nThe CVE description names two files. The bug was every write-side action in the folder.\n\n## The bug class was every write in the team module\n\nShopper is a Laravel storefront framework that wires Livewire components into the admin panel and stores permissions through `spatie/laravel-permission`. The seeded permission table, defined in `packages/admin/database/seeders/PermissionsTableSeeder.php`, registers two sibling permissions in the same `system` group: `view_users` and `access_setting`. The display names give the intent away. `view_users` is the read-only permission. `access_setting` is the administrative one. A low-privilege staff role assigned only `view_users` is supposed to see the team page and write nothing.\n\nUntil 2.8.0, every write-side Livewire action under `packages/admin/src/Livewire/{Pages,Components,SlideOvers}/Settings/Team/` was guarded by `$this->authorize('view_users')`, or in two cases by no `->authorize()` at all. A staff user holding only the read-only permission could call any of them. The destinations included `Role::create`, role deletion, granting and revoking permissions on roles, creating a new staff user with the `admin` role and a chosen password, and updating the role record itself. PR #514's own commit message walks the chain: \"CreateTeamMember::mount / store allowed creating a new staff user with the admin role and a chosen password, then logging in.\"\n\nThe GHSA describes this as \"missing authorization checks.\" The code calls `authorize`. It calls it on the wrong name.\n\n## PR #511 read the two files the GHSA names\n\nCVE-2026-47744's advisory text names `Settings/Team/Index` and `Settings/Team/RolePermission`. PR #511 changes both.\n\n`Pages/Settings/Team/Index.php` had no `mount()` method before the patch. The class went straight to the table render with no entry-time check, so any authenticated user could load the page. The patch adds one:\n\n```php\npublic function mount(): void\n{\n $this->authorize('view_users');\n}\n```\n\nTwo of the page's actions are also re-gated. `createRoleAction` and the user `DeleteAction` each gain a chained `->authorize('access_setting')`. The existing UI gate on the delete, `->visible(fn (ShopperUser $record): bool => shopper()->auth()->user()->isAdmin() && ! $record->isAdmin())`, stays in place; the `->authorize` is now the server side of it.\n\n`Pages/Settings/Team/RolePermission.php` is edited harder. The `save()` method, which mutates the role record, changes from `$this->authorize('view_users')` to `$this->authorize('access_setting')`:\n\n```diff\n public function save(): void\n {\n- $this->authorize('view_users');\n+ $this->authorize('access_setting');\n\n $this->role->update($this->form->getState());\n```\n\nThe two action closures, `generatePermissionsAction` and `createPermissionAction`, are moved from inline `$this->authorize('view_users')` calls to chained `->authorize('access_setting')` declarations on the Filament `Action`. The Filament idiom hides the button when the user is forbidden, where the inline call would have thrown after the click. The semantics shift; the permission name is corrected at the same time.\n\nThe test fixtures shift with them. `tests/Admin/Livewire/Pages/Settings/Team/IndexTest.php` and `tests/Admin/Livewire/Pages/Settings/Team/RolePermissionTest.php` previously seeded the acting user with `givePermissionTo('view_users')`. Both files now read `givePermissionTo(['view_users', 'access_setting'])`. The tests that passed pre-patch passed because the test user had the only permission the gate asked for. The gate is no longer the only ask.\n\nOne regression test is added in `IndexTest.php`: `it('forbids mount for users without view_users')`. No regression test is added for the actions PR #511 has just chained `->authorize('access_setting')` onto. The test covers the entry-time read gate the GHSA narrative emphasized. The action gates get covered five days later, by someone else.\n\n## The author opened Permissions.php and left the line\n\n`packages/admin/src/Livewire/Components/Settings/Team/Permissions.php` is the role-permissions sub-component. It has two write methods, `togglePermission(int $id)` and `removePermission(int $id)`. Both, pre-patch, opened with `$this->authorize('view_users')`:\n\n```php\npublic function togglePermission(int $id): void\n{\n $this->authorize('view_users');\n /** @var Permission $permission */\n $permission = Permission::query()->find($id);\n\n if ($this->role->hasPermissionTo($permission->name)) {\n $this->role->revokePermissionTo($permission->name);\n // ...\n } else {\n $this->role->givePermissionTo($permission->name);\n // ...\n```\n\nPR #511 edits this file. The author adds `#[Locked]` to the `public Role $role` property at the top of the class, recognizing that a Livewire-bound model property is otherwise re-hydratable from the client side and that a low-privilege caller could submit `role` pointing at the admin role. The author adds null-guards around `Permission::query()->find($id)`, replacing a chained `$permission->name` dereference that crashed on miss with an `if ($permission === null) { return; }` early return. Both methods are touched. The hardening is real.\n\nThe `$this->authorize('view_users')` line is on screen for both. It does not move.\n\nFive days later, PR #514 changes it. One word, in two methods:\n\n```diff\n public function togglePermission(int $id): void\n {\n- $this->authorize('view_users');\n+ $this->authorize('access_setting');\n\n $permission = Permission::query()->find($id);\n\n// ...\n\n public function removePermission(int $id): void\n {\n- $this->authorize('view_users');\n+ $this->authorize('access_setting');\n```\n\nThe fix is the line PR #511 was reading. PR #511's editor pass changed every line of these two methods except the line that mattered.\n\n## visible() is not authorization\n\nThe same file PR #511 had just finished editing, `Pages/Settings/Team/RolePermission.php`, has one more write action: `deleteAction()`, which deletes the role record. Pre-patch, post-PR-#511, and pre-PR-#514, this method looks identical:\n\n```php\npublic function deleteAction(): Action\n{\n return DeleteAction::make('delete')\n ->label(__('shopper::forms.actions.delete'))\n ->icon(Untitledui::Trash03)\n ->visible($this->role->can_be_removed)\n ->record($this->role)\n ->successNotificationTitle(__('shopper::notifications.users_roles.role_deleted'))\n ->after(fn () => $this->redirectRoute(name: 'shopper.settings.users', navigate: true));\n}\n```\n\nThere is no `->authorize()`. There never was. The only gate the action carries is `->visible($this->role->can_be_removed)`. Two things are wrong with reading that as authorization.\n\nFirst, `visible()` is a Filament UI affordance. It controls whether the delete button is rendered in the page; it does not control whether a Livewire client dispatch carrying the action's name reaches the server handler. Livewire actions are addressable. Hiding the button hides the entry point from the user who is logged in, not from a forged Livewire dispatch that names the action directly. The pattern in the rest of the codebase, `->authorize('permission')` chained alongside `->visible(...)`, exists for the same reason every Laravel security guide repeats the lesson: server-side gates and client-side affordances are different controls.\n\nSecond, `$this->role->can_be_removed` is a column on the `roles` table, not a permission on the user. It encodes whether the role is one of the system-defined ones (admin, default user) or a user-created one. The check answers \"is this role allowed to be removed by anyone?\" It does not answer \"is this caller allowed to remove this role?\" Those are different questions. The first is a property of the object. The second is a property of the subject acting on it.\n\nPR #514 adds `->authorize('access_setting')` alongside the `->visible()`. Its commit message describes the structure as found: \"RolePermission::deleteAction had no `->authorize()` at all, only a `->visible($role->can_be_removed)` gate.\" The author of the second pass writes down what the first pass walked past.\n\n## Five files, three folders, one substrate\n\nThe full scope of the fix across PR #511 and PR #514 reaches five Livewire files, eight write-side methods, in three subfolders under `packages/admin/src/Livewire/`:\n\n```\nPages/Settings/Team/Index.php mount + createRoleAction + DeleteAction (#511)\nPages/Settings/Team/RolePermission.php save + generatePermissionsAction + createPermissionAction (#511)\nPages/Settings/Team/RolePermission.php deleteAction (#514)\nComponents/Settings/Team/Permissions.php togglePermission + removePermission (#514)\nSlideOvers/CreateTeamMember.php mount + store (#514)\n```\n\nEvery entry on the list was, until 2.8.0, gated on `$this->authorize('view_users')` or, in two cases, on no `->authorize()` at all. Every entry is, after 2.8.0, gated on `$this->authorize('access_setting')`. There is no central policy class, no folder-level middleware, no Filament Resource defining the team-settings authorization in one place. Each Livewire component is its own boundary. Each write action carries its own authorization decoration. Each decoration is a hand-typed magic string.\n\nShopper's CVE-2026-47744 is not what happens when a developer forgets to add a check. It is what happens when every check is independent and the permission name is a string. The wrong string on one method is a vulnerability. The right string on one method is a fix for that method. The right string on every method is what the next CVE will require, and the method after that, until the next contributor adds a Livewire write action somewhere under `Settings/`. This is [Design Debt Driver](/patterns/design-debt-driver): a component class whose architecture produces bugs of the same shape, patch after patch, with the maintenance team running behind the substrate. CVE-2017-8046 and the four Spring SpEL-injection CVEs that followed it are the same shape on a different language. CVE-2026-40858 and its [eight Apache Camel components](/posts/camel-cve-2026-40858-same-five-lines-eight-components) are the same shape on a different framework. Shopper is the shape inside one folder.\n\nThe two PRs collapse into one observation about audit scope: PR #511 read the two files the GHSA names. PR #514 read the folder. PR #514's commit message says the same thing in maintainer terms: \"All three are now gated on `access_setting`, matching the pattern from GHSA-f946-9qp6-vgch / #511.\" The author of the second pass states, in writing, that PR #511 had a pattern and applied it only to the named scope. The pattern was the folder. The advisory was the two files.\n\nShopper 2.8.0 was tagged after both commits landed. The CVE-2026-47744 advisory text still describes Settings/Team/Index and Settings/Team/RolePermission. The released code closes five files. A defender reading the advisory and reviewing PR #511 sees the named scope and stops there; the code shipped has a wider one. Researchers comparing 2.7.3 to 2.8.0 will diff eight write-side methods, not two.\n\nThe next Livewire write action a contributor adds under `Settings/Team/` will gate on a hand-typed string.","closing_line":"The substrate decides whether the next CVE is one PR away or three.","hook_md":"Shopper 2.8.0 fixes CVE-2026-47744 by adding `$this->authorize('access_setting')` to write actions in two Livewire files under `packages/admin/src/Livewire/Pages/Settings/Team/`. The commit, PR #511, lands on May 11, 2026. The next security commit on the same folder lands five days later: PR #514, titled \"close remaining authorization gaps in team settings.\" It gates three more write paths on the same `access_setting` permission, against the same low-privilege escalation, against the same `view_users` read-only gate that PR #511 left in place. One of the three is a method inside a file PR #511 had already edited.\n\nThe CVE description names two files. The bug was every write-side action in the folder.","post_id":570,"slug":"shopper-cve-2026-47744-the-class-was-the-folder","title":"CVE-2026-47744: Shopper Patched The Two Files The GHSA Named. The Class Was The Folder.","type":"initial","unreadable_sentence":"PR #511 read the two files the GHSA names. PR #514 read the folder."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCawuHzAAKCRDeZjl4jgkQ Jhl/AQD73Myf5v9QNxe8Q1zXZPhTHVv4Q5kRshCrBi5yPURxJgD+Khou/SzTtobP bKxb/n61kB/voVq0PrWhzQcUmdPc1wg= =By9+ -----END PGP SIGNATURE-----