Broken access control in CuratorPanel item actions allows editing, deleting, and downloading arbitrary Media records
Description
The media picker modal (CuratorPanel, mounted by the CuratorPicker form field) exposed per-item Edit, Delete, and Download actions that resolved their target Media record from client-supplied input — the Livewire action arguments, and on the 3.x line the selected component property — and then acted on it without a per-record authorization check and without tenant scoping.
Any authenticated user who can reach a form that embeds a CuratorPicker field (the plugin's normal, documented usage — e.g. a "featured image" picker on a Post resource available to editors/authors) could edit, delete, or download any Media record in the application by id, regardless of:
- any
MediaPolicythe host application defines (update/delete/viewabilities were not consulted on these code paths), and - Curator's multi-tenancy feature (
curator.features.tenancy.enabled), which was enforced on the panel's list/search queries but not on these actions.
The Download action additionally streamed a file from a disk and path taken directly from the client payload rather than from the stored record.
Impact
- Who: any authenticated user with access to a page containing a
CuratorPickerfield. - What: unauthorized edit and deletion of arbitrary
Mediarecords (including their underlying files), and disclosure of other records' metadata (via the edit form prefill) and file contents (via download). - Consequence: in multi-tenant deployments, cross-tenant modification, destruction, and disclosure of other tenants' media. In any deployment relying on a restrictive
MediaPolicy, that policy was silently ineffective on these code paths.
Note on the 3.x line
On 3.x the affected actions were already behind a global authorization guard (CuratorPlugin::authorize()), which checks the ability against the Media class, not the target record. That guard blocked users with no delete/update/download ability at all, but did not provide per-record or tenant enforcement — so a user holding the global ability could still act on any record across tenants, and the download disk/path was still client-controlled. The 4.x and 5.x lines had no authorization guard on these actions.
Patches
All three actions now resolve the record through a single helper that applies the same tenant scoping used by the panel's list/search queries and a per-record authorization check before acting; the download action derives disk/path from the resolved record. On 4.x/5.x this defers to MediaResource's authorization (which allows when no policy is registered, preserving existing behaviour, and enforces the policy when one exists); on 3.x it retains the existing global guard and adds the per-record Gate check.
Upgrade to 3.7.10, 4.1.3, or 5.1.3. No configuration changes or data migration are required.
Workarounds
There is no configuration-only workaround; upgrading is required. Restricting which users can reach forms containing a CuratorPicker reduces exposure but does not close the issue.