GHSA-863Q-9V8V-M9FV
Stored cross-site scripting in the Data Manager item view
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-863Q-9V8V-M9FV divulgada · CVSS 8.2 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The Data Manager plugin renders stored data entries in its item-detail view without escaping them. A visitor who submits a form on the front end can store an HTML payload that executes as script when an administrator later opens that entry in the admin panel, in the administrator's own session and origin.
This affects sites using the classic admin panel. Sites running the Grav 2.0 Admin Next stack are not affected, because that interface renders the same data through a separate, correctly escaping code path.
Impact
An unauthenticated visitor can run arbitrary JavaScript in the session of any administrator who views the submission, with that administrator's privileges and CSRF token. On a site whose forms save submissions to `user/data` — the documented pattern the plugin exists to support — this is reachable without any account and without any non-default setting.
The payload can execute without interaction when the submitted value is a list, such as a checkbox or multi-select field, and on hover for ordinary text fields.
Details
`admin/templates/partials/item.html.twig` applies Twig's `raw` filter to submitted values in five places.
One of them joins list values and prints them with no filter at all. The others pass the value through `striptags('<br>')` first, which is not a defence: PHP's `strip_tags()` preserves an allowed tag together with all of its attributes, so a `<br>` carrying an event handler and sizing styles survives the filter and reaches the browser intact.
The list view in the same plugin already escapes correctly, as does the Admin Next component. The flaw is isolated to the item-detail template.
Affected versions
Data Manager 1.0.1 through 1.4.4, on both Grav 1.7 and Grav 2.0, when the classic admin panel is in use. The unescaped output has been present since September 2015.
Patches
Update the Data Manager plugin to 1.4.5 or later. The item-detail view now escapes all stored values before rendering, converting newlines to line breaks after escaping rather than before.
Workarounds
Operators who cannot update immediately can restrict the `admin.data-manager` permission so fewer accounts can open the affected view, or move to Grav 2.0 with Admin Next, whose data browser is unaffected. Neither removes the stored payload, so review existing entries in `user/data` after updating.
Credits
Reported by @AlpetGexha.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistgetgrav/grav-plugin-data-manager |
Corregida | 1.4.5 | — | — |
1.4.5Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/getgrav/grav/security/advisories/GHSA-863q-9v8v-m9fvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
