llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · django-cms

GHSA-MGV8-5R6J-2GJQ

Stored XSS in the page delete confirmation view allows privilege escalation from editor to administrator

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.4
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -1 d de la divulgación
Exposición57 dDesde la divulgación, 24 sept 2026, 9:55 a. m.
Detección55 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 5.1.3
Monitoreo
Detectada +1
23 sept 26
24 sept 26
18 nov 26
21 nov 26
23 sept 26
8 oct 26
22 oct 26
6 nov 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 5.1.3 django-cms · -1 d desde divulgación
Divulgación Publicada GHSA-MGV8-5R6J-2GJQ divulgada · CVSS 5.4 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Affected version notes

Verified by inspecting `cms/admin/pageadmin.py` at every release tag. The vulnerable branch was
introduced by df4066639 (“fix: Added the new delete confirmation for pages also to delete
translation”, #8111, 2025-01-30) and is present in every 5.0.x and 5.1.x release.

---

Summary

A user with permission to change pages can store HTML in a page's URL path via the Overwrite URL
field. The page delete confirmation screen renders that value without escaping, so the markup
executes in the browser of any user who opens the confirmation screen for that page — typically an
administrator. This allows an ordinary content editor to escalate to administrator.

Impact

`PageDeleteMessageMixin.get_deleted_objects()` in `cms/admin/pageadmin.py` applies `mark_safe()` to
the display string for related `PageUrl` objects. Because `PageUrl` is not registered in the Django
admin, `django.contrib.admin.utils.get_deleted_objects()` builds that entry as a plain, unescaped
`"%s: %s" % (verbose_name, obj)` string. Marking it safe means the stored path is emitted as markup
by `{{ deleted_objects|unordered_list }}`.

Scripts executing on the admin origin in an administrator's session cannot read the session cookie
(`HttpOnly`), but can read the CSRF token and issue authenticated requests as that administrator —
for example creating a superuser or granting permissions. The practical outcome is full escalation
from editor to administrator.

Who can exploit it: any staff user who can change at least one page. This holds under both
permission models:

  • With `CMS_PERMISSION = False` (the shipped default), the Django model permission `cms.change_page`
  • With `CMS_PERMISSION = True`, a user granted change rights on a page via `PagePermission` can

Who is affected: any user with delete permission on the poisoned page who opens its delete
confirmation screen.

Scope of the sink. Only the `PageAdmin` delete confirmation
(`/admin/cms/page/<id>/delete/`) renders the vulnerable entry. The `PageContentAdmin` delete view
(deleting a translation) does not, because `PageUrl` relates to `Page` rather than `PageContent` and
is therefore absent from the collected objects. The changelist `delete_selected` action is not
exposed on these admins.

Attack scenario

  1. An editor sets a page's Overwrite URL to a value containing markup and no `/`, such as
  2. The editor can make the page an attractive deletion target, for example by creating a page that
  3. An administrator opens the page's delete confirmation screen — a mandatory step before deleting a

A second route stores the payload on the home page, where `ChangePageForm.clean()` returned
early and never validated the value. It is ignored while the page is the home page, but becomes the
live `PageUrl.path` as soon as another page is made the home page.

Patches

Two changes, defence in depth:

  • Output encoding (the fix). `PageDeleteMessageMixin.get_deleted_objects()` no longer marks the
  • Input validation (hardening). A page path with no `/` is now validated instead of skipped, and

Upgrading is required even if no editor is untrusted today. Input validation does not clean
values already stored in the database, and paths written through `cms.api` or a direct model save
never pass through the form at all. Only the output-encoding change protects those rows.

Workarounds

None that preserve functionality. Operators who cannot upgrade immediately can limit who holds
`cms.change_page` (or `PagePermission` change rights) to fully trusted users, and audit existing
data for stored markup:

from cms.models import PageUrl
PageUrl.objects.filter(path__regex=r"[<>]")

References

  • Vulnerable code: `cms/admin/pageadmin.py`, `PageDeleteMessageMixin.get_deleted_objects()`
  • Introduced in: df4066639 (#8111)
  • Fix commit / PR: #8888

Credits

Reported by Tao Xu (许涛).

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:R
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.2/ 10Alto
Vector 7.2 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
django-cms≥ 5.0.0 ≤ 5.1.2
5.0.0
5.1.2
5.1.3
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypidjango-cms
Corregida 5.1.3 -1 d 5.1.3 no afectada
Versiones corregidas5.1.3
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/django-cms/django-cms/security/advisories/GHSA-mgv8-5r6j-2gjq

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.