GHSA-4CCP-5FG5-PJGP
Authorization bypass of hooks in batch deletion and file uploads
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4CCP-5FG5-PJGP divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Users who can delete pages or files, or upload or replace files, can do so even when a hook throws an exception to prevent it.
You're affected if
- Kirby 4.9.7 or older, or Kirby 5.0.0–5.6.3
- Users you do not fully trust have the permission for the action (`pages.delete`, `files.delete`, `files.create` or `files.replace`)
- A hook in your site or a plugin throws an exception to block or validate the action:
- `file.create:before` or `file.replace:before`
- `page.delete:before` or `file.delete:before`, if a `pages` or `files` section has `batch: true` (Kirby 5)
This covers uploads and replacements via the REST API, batch deletion in the Panel, and plugin code calling `Kirby\Api\Api::upload()`, `Kirby\Cms\Pages::delete()` or `Kirby\Cms\Files::delete()`.
Potential damage
- Can delete any page or file that a `page.delete:before` or `file.delete:before` hook protects
- Can upload or replace files that a `file.create:before` or `file.replace:before` hook rejects
- Can stop `:after` hooks, e.g. for logging, from running for most of these actions
- Cannot perform actions that their role permissions or blueprint `options` deny
- Cannot bypass Kirby's own upload checks, e.g. file extensions or the file blueprint `accept` option
Patches
- Fixed in Kirby 4.9.8
https://github.com/getkirby/kirby/releases/tag/4.9.8and Kirby 5.6.4https://github.com/getkirby/kirby/releases/tag/5.6.4 - Hooks are now only skipped while they are already running.
- Files uploaded before the update are not re-checked.
Workarounds
- Remove `batch: true` from all `pages` and `files` sections.
- Enforce these restrictions with role permissions or blueprint `options` and `accept` rules instead of hooks.
Credits
Thanks to @medienbaecker for responsibly reporting the identified issue.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistgetkirby/cms |
Corregida | 4.9.8, 5.6.4 | — | — |
4.9.85.6.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/getkirby/kirby/security/advisories/GHSA-4ccp-5fg5-pjgpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
