GHSA-H4VJ-7F3M-24RP
Bypass of content validation when creating published pages
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-H4VJ-7F3M-24RP divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Users who can create and publish pages can create pages directly as listed or unlisted via the REST API, even if the page content does not pass the field validation of the page blueprint.
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 `pages.create` and `pages.changeStatus` permissions (on Kirby versions older than 4.9.0 or 5.4.0, `pages.create` alone is enough)
- Your page blueprints rely on field validation (e.g. `required: true`, `min`, `max` or `pattern`) to keep incomplete pages from being published
This covers page creation via the REST API (`POST /api/pages/(:any)/children` and `POST /api/site/children`) with `isDraft: false`, and plugin code that calls `Kirby\Cms\Page::create()` or `createChild()` with `isDraft` set to `false`. The page creation dialog in the Panel is not affected.
Potential damage
- Can publish pages with content that fails the blueprint's field validation, e.g. with required fields left empty
- Can skip the `page.changeStatus.incomplete` check that blocks publishing an incomplete draft
- Cannot publish pages without the `pages.changeStatus` permission (since Kirby 4.9.0 and 5.4.0)
- Cannot perform any other actions that their role permissions or blueprint `options` deny
- Cannot read or change any content beyond the pages they create
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 - The content of a page that is created as listed or unlisted is now validated after the submitted content has been applied, the same way as when a draft is published.
- On multi-language sites, publishing a page now validates the content in all languages, not only in the current one.
- Plugin code that creates listed or unlisted pages with incomplete content will now throw a `page.changeStatus.incomplete` exception. Create such pages as drafts and fill in the content first.
- Pages published before the update are not re-checked.
Workarounds
- Add a `page.create:before` hook that rejects published pages with incomplete content:
```php
'hooks' => [
'page.create:before' => function (Kirby\Cms\Page $page) {
if ($page->isDraft() === false && $page->errors() !== []) {
throw new Exception('The page content is incomplete');
}
}
]
```
- Remove the `pages.changeStatus` permission from roles you do not fully trust.
Credits
Thanks to @manus-pi 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-h4vj-7f3m-24rpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
