GHSA-G59G-HG2R-22VP
Editor Filesystem Rename Bypasses SVG Sanitization
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-G59G-HG2R-22VP divulgada · CVSS 3.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
The Editor module file upload handler (`Editor\Traits\FileSystemFunctions::editorUploadFiles`) sanitizes `.svg` uploads by passing their contents through `Html::cleanVector` before writing to disk. The rename handler in the same trait (`editorRenameFileOrDirectory`) validated the new extension against an allowlist but did not apply equivalent sanitization when the rename target was `.svg`. A backend user with the `editor.cms_assets` permission could upload arbitrary bytes under an allowed non-svg extension (for example, `.js` with SVG markup), then rename the file to `.svg` via the Editor, persisting an unsanitized payload at a public theme asset URL. This is a variant of GHSA-96hh-8hx5-cpw7, which blocked the equivalent rename path in the Media Manager but left the Editor module unprotected.
Scope of impact is narrow. Exploitation requires authenticated backend access with the `editor.cms_assets` permission. Under the standard October CMS trust model, users granted access to the Editor are Developer-trust by design (theme markup editing already allows direct PHP execution outside Safe Mode), so this is primarily a defense-in-depth issue for deployments that intentionally grant `editor.cms_assets` to a lower-trust role without granting full developer access.
### Impact
- Stored XSS executing in the application origin when a user opens the served `.svg` asset URL
- SVG sanitizer bypass: `Html::cleanVector` runs on the upload path but was not invoked on the rename path, so an unsanitized payload uploaded under a non-svg extension could be promoted to `.svg`
- Requires authenticated backend access with the `editor.cms_assets` permission
- Bounded by the trust model: Editor access is Developer-trust by design
### Patches
The vulnerability has been patched in v3.7.18 and v4.3.3. The Editor rename handler now blocks renaming a non-svg file to a `.svg` target when `media.clean_vectors` is enabled, mirroring the existing guard in the Media Manager rename handler. Rename of `.svg` to `.svg` (for example, correcting a typo) remains allowed.
### Workarounds
If upgrading immediately is not possible:
- Restrict the `editor.cms_assets` permission to fully trusted backend users only, consistent with the standard October CMS recommendation that Editor access is granted only to developers
### References
- Reported by wsparks-vc
- Related: GHSA-96hh-8hx5-cpw7 (equivalent Media Manager rename guard)
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 |
|---|---|---|---|---|
Packagistoctober/october |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/octobercms/october/security/advisories/GHSA-g59g-hg2r-22vpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
