GHSA-M5VP-X463-4MH9
Cross-site scripting (XSS) via raw text elements in SVG and XML files
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-M5VP-X463-4MH9 divulgada · CVSS 7.4 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Users who can upload files can store SVG or XML files with JavaScript that runs when a site embeds the file inline.
You're affected if
- Kirby 4.9.7 or 5.6.0–5.6.3
- Users you do not fully trust can upload or replace files
- A file blueprint accepts SVG files (the default) or XML files
- Your site embeds uploaded SVG or XML files inline, e.g. with the `svg()` helper
This also covers plugin code that checks or cleans SVG/XML with `Kirby\Sane\Sane`, `Kirby\Sane\Svg`, `Kirby\Sane\Xml` or `Kirby\Toolkit\Dom::sanitize()`.
Potential damage
- Can store SVG or XML files with JavaScript that the upload checks would otherwise reject
- Can run that JavaScript in the browser of anyone who views a page that embeds the file inline
- Can then act with that person's permissions, e.g. an admin's, while they are logged in to the Panel
- Cannot run JavaScript when the file is opened from its media URL or embedded with `<img>`
- Cannot gain higher permissions unless such a user views the page
- Cannot bypass file name or extension rules (no `.php` or `.html` files)
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 - `Kirby\Toolkit\Dom` now treats all HTML raw text elements as raw text.
- Files uploaded before the update are not re-checked.
Workarounds
- Deliver uploaded SVG and XML files from their media URL or with `<img src>` instead of embedding them inline.
- Only let fully trusted users upload or replace SVG or XML files.
Credits
Thanks to Arpit Jain (@arpitjain099) 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-m5vp-x463-4mh9Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
