GHSA-PHVW-WH68-RXMP
Curation entries saved from the media edit form can read, delete and move files outside the media item
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-PHVW-WH68-RXMP divulgada · CVSS 8.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Curations, the cropped versions of an image, are listed on the media item's edit page. Each saved curation records which storage disk and path its file lives on. The edit form sends those values back from the browser, and Curator saved them as received.
Other parts of Curator then trusted the stored disk and path. A user who can edit a media item could point a curation at any file and:
- read it: `<x-curator-curation>` and the edit form build a link to the curation's file. On disks that issue temporary or signed URLs (S3, or Laravel's `local` disk with `serve` enabled), that link gives access to private files on any disk the application has configured. This affects every 5.x, 4.x and 3.x release.
- delete it (5.x from 5.5.0): deleting the media item also deletes the files its curations point to.
- move it (5.x from 5.5.0): renaming the media item moves its curation files, and a path containing `../` passed the folder check.
A curation's files live in a folder named after the media item, `{directory}/{name}/`, and two items could end up sharing that folder: items with the same name but different extensions, or, with `DatePathGenerator` or `UserPathGenerator`, an item renamed to another item's name whose file is then swapped, which moved it into the upload's folder. The user editing one item could then read, overwrite or delete the other item's curations, and a swap could overwrite the other item's file. On 4.x and 3.x, deleting a media item removes its whole curation folder, which could also hold other files.
Exploiting this needs an account that can update a media item, plus delete or rename it for the write impacts, with curations enabled (the default). In a multi-tenant panel, that reaches other tenants' files.
Patches
Upgrade to 5.6.6, 4.2.8 or 3.7.15.
- Saving: a curation entry is kept only when it is already stored on the item or names a file directly inside the item's own curation folder (`{directory}/{name}/`) on the item's disk. Its disk and URL are set by the server.
- Deleting and renaming: only files inside the item's own curation folder are touched, never another media item's file.
- Links: built only for an image one folder below the item's directory on its own disk, never for another media item's file.
- Curation modal: a curation is never saved over another media item's file.
- Names: a media item can no longer take a name another item in the same directory already has, whatever its extension, or the name of an existing folder, so two items never share a curation folder. Names handed out within one request, such as a multi-file upload, are never reused.
- File swap: the replacement takes the original's place in the item's own folder instead of moving the item into the upload's folder.
- Deleting (4.x and 3.x): only curation images directly in the item's folder are removed, then the folder if empty. A folder holding another item's file, or shared with another item of the same name, is left alone.
5.6.5 contained the first part of this fix. Upgrade to 5.6.6, which also covers the file swap.
This is a different path from GHSA-3xm3-q2fj-x8rq, which fixed the curation modal writing to a client-supplied key. Here the edit form saves the curation's disk and path as the browser sends them.
Remediation for existing data
Entries stored before upgrading are not rewritten. They are no longer acted on for delete or move, and links are built only within the rules above. To review stored curations, list entries whose `path` does not start with the item's own `{directory}/{name}/`, for example with `php artisan tinker`:
use Awcodes\Curator\Models\Media;
Media::query()->whereNotNull('curations')->get()->filter(function (Media $media): bool {
$folder = trim(($media->directory ? $media->directory . '/' : '') . $media->name, '/') . '/';
return collect($media->curations)->contains(fn ($item): bool => ! str_starts_with(ltrim($item['curation']['path'] ?? '', '/'), $folder)
|| ($item['curation']['disk'] ?? $media->disk) !== $media->disk);
})->pluck('id');Entries left behind by an earlier rename also show up here and are harmless; review the rest.
Workarounds
Restrict media editing to trusted users, or disable curations: `CuratorPlugin::make()->curations(false)` on 5.x and 4.x, or `'tabs' => ['display_curation' => false]` in `config/curator.php` on 3.x. Hiding the tab stops new entries being saved. Entries already stored are still rendered by `<x-curator-curation>`.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistawcodes/filament-curator |
Corregida | 3.7.15, 4.2.8, 5.6.6 | — | — |
3.7.154.2.85.6.6Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/awcodes/filament-curator/security/advisories/GHSA-phvw-wh68-rxmpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
