GHSA-7QG6-3972-X29W
Stored XSS in Backend Markdown Editor Preview
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-7QG6-3972-X29W divulgada · CVSS 3.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
The `Backend\FormWidgets\MarkdownEditor` form widget rendered its preview pane without HTML sanitization. The Vue-based editor wired DOMPurify in the wrong configuration key for EasyMDE (`sanitizerFunction` at the top level, where EasyMDE only looks under `renderingConfig.sanitizerFunction`) and the custom `previewRender` callback returned EasyMDE's raw markdown-to-HTML output directly to the preview pane. The legacy jQuery-based path rendered server-side through `Markdown::parse` and injected the result via `.html()` with no sanitization either. A backend user who could author markdown into a field rendered by this widget could include raw HTML such as `<img src=x onerror=...>` which would execute when another backend user opened the same record and the preview pane rendered.
Scope of impact is narrow. Exploitation requires authenticated backend access to a record whose markdown field is reviewed by another backend user. Under the standard October CMS trust model, users with permission to author content are trusted to author content, and a backend user reviewing authored content is a deliberate action. The render path was intended to sanitize the preview, but the sanitizer was misconfigured, so the framework's intended defense did not run.
### Impact
- Stored XSS executing in the backend origin of any backend user who opens a record containing attacker-authored markdown with raw HTML
- Requires authenticated backend access for both the author and the reviewer
- Bounded by the trust model: backend users authoring content are trusted to author content, including HTML in markdown
### Patches
The vulnerability has been patched in v4.3.2. The `MarkdownEditor` widget exposes a new `safeMode` property (default `true`) that wires DOMPurify into the `previewRender` callback in the Vue/EasyMDE path, and uses `Markdown::parseClean` (HtmlPurifier-cleaned) in the legacy server-side path. The misconfigured top-level `sanitizerFunction` option that was never reached has been removed. A previously-existing `safe` property is retained for backwards compatibility but is deprecated in favour of `safeMode`.
### Workarounds
If upgrading immediately is not possible, restrict markdown editing access to fully trusted backend users only, consistent with the standard October CMS recommendation to restrict backend access to trusted administrators.
### References
- Reported by ymmfty0
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/system |
Corregida | 4.3.1 | — | — |
4.3.1Arsenal 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-7qg6-3972-x29wLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
