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

GHSA-976Q-W6CH-6W82

Page-tree copy, duplicate and move can disclose view-restricted pages and discard their view restrictions

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

Parche disponible
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/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:46 a. m.
Detección55 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
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-976Q-W6CH-6W82 divulgada · CVSS 6.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

With `CMS_PERMISSION=True`, three page-tree operations relocate pages without preserving the view restrictions that protected them, and two of them authorize only the entry point of the subtree they act on. In each case content protected by per-page view restrictions can end up readable by anonymous visitors.

Copy. An authenticated delegated CMS editor who can view a source page and add pages at a destination can copy descendants they cannot view. When permission copying is disabled, the copied descendants lose their source PagePermission records. At an unrestricted destination, their content can become accessible to anonymous visitors. A separate defect in the same operation ignores `copy_permissions` for the copied root: even when the operator selects Copy permissions, the root's own PagePermission records are omitted, so a root restricted by those records can become publicly readable at an unrestricted destination.

Duplicate. The single-page Duplicate creates the new page with no PagePermission records at all. Since GHSA-6x92-6vx4-5fwr the editor must be able to view the source, so this is publication rather than disclosure to the editor: a view-restricted page duplicated into an unrestricted destination becomes anonymously readable, and the Duplicate flow offers no permission-copying option at all.

Move. Moving a page out of a restricted branch discards the view restrictions that it and its descendants inherited from the ancestors they leave behind. Unlike Copy and Duplicate this exposes the original pages rather than a new copy, and `PageAdmin.move_page` authorizes only the moved root, so descendants the moving editor is not allowed to view are exposed as well — and become readable to that editor afterwards.

Details

`PageAdmin.copy_page` checks source view permission on the root only. `Page.copy_with_descendants` copies all descendants and their content without a per-descendant authorization decision. `CopyPageForm.copy_permissions` is optional and false by default.

The model method forwards `permissions=copy_permissions` to descendant copies but omits it from the root copy. `Page.copy` defaults `permissions` to false.

`AddPageForm.from_source` calls `Page.copy(..., permissions=False)`, and `DuplicatePageForm` inherits it unchanged, so a duplicate carries no permission records. `DuplicatePageForm.clean_source`, added for GHSA-6x92-6vx4-5fwr, still refuses a source the editor cannot view; the defect is that the readable-but-restricted source is republished without its restrictions.

`PageAdmin.move_page` checks `user_can_move_page` on the moved root and add permission on the target. `Page.move_page` runs the tree move and does not touch permissions. Because `PagePermission.objects.for_page()` resolves inherited grants by tree path, a subtree that leaves its restricted ancestors silently loses those grants. The `move_page` action requires both `can_change` and `can_move_page`, and change permission implies view permission, so the moving editor can always read the moved root; the authorization gap is on the descendants, which are never consulted.

Copying direct permission records alone is insufficient to preserve restrictions inherited from ancestors outside the copied or moved subtree. Destination grants also matter: django CMS grants view access to users who can change a page, even if that page has view restrictions.

The admin endpoints use their existing JSON error protocol: a permission denial is represented by a JSON `status` value of 403 inside an HTTP 200 response.

Impact and prerequisites

The demonstrated attacks require:

  • `CMS_PERMISSION=True` and source content protected by per-page view restrictions;
  • an authenticated staff editor with the model and CMS permissions needed to add pages at a destination, plus copy, duplicate or move rights on the source;
  • for the descendant variants, a readable source root containing an unreadable descendant;
  • a destination and publication configuration under which the unrestricted result is readable.

For Copy and Duplicate the source content is not modified and the demonstrated impact is confidentiality loss through a newly created copy. Move differs: it relocates the original pages, so the protected content itself becomes publicly readable and the editor gains read access to descendants that were previously refused. The proposed score follows the demonstrated confidentiality impact; it does not claim unauthenticated initiation of any of these operations.

The `copy_permissions` defect and the Duplicate and Move defects also affect legitimate users acting on readable, restricted pages with the explicit intention of preserving permissions.

Reproduction summary

Copy:

  1. Create a public source page with a child restricted to another user. Put a distinct text marker on the child.
  2. Give a staff editor add/change model permissions and an add/change CMS grant in a separate destination subtree, without source view or change access to the restricted child.
  3. Confirm the original child is unreadable to the editor and returns 404 to an anonymous visitor.
  4. As the editor, POST to `/en/admin/cms/page/<source_id>/copy-page/` with `position=0`, `target=<destination_id>` and `copy_permissions=`.
  5. On vulnerable code, the copy succeeds. The copied child has no view restriction and its marker is served to an anonymous visitor when the destination is public.

For the second copy defect, copy a root restricted to the copying editor with `copy_permissions=on` into a public destination. On vulnerable code, the copied root has no permission records and is anonymously readable.

Duplicate: give the editor view access to a restricted page carrying a marker, then POST the Duplicate form for that page's content object with `parent_page=<public destination>`. On vulnerable code the duplicate has no view restriction and the marker is served to an anonymous visitor.

Move: place the marker page below a page restricted to another user, give the editor change and move rights on an intermediate page but no access to the marker page below it, then POST to `/en/admin/cms/page/<intermediate_id>/move-page/` with `position=0` and `target=<public destination>`. On vulnerable code the whole moved subtree, including the page the editor could not view, loses its inherited restriction and is served to anonymous visitors at its new URL.

Fix behavior

The fix keeps every existing source and destination check and adds a shared mechanism plus per-operation guards.

`Page.get_view_restrictions()` snapshots the `can_view` grants that protect a page — its own rows and the ones inherited from ancestors, each expressed relative to that page. `Page.apply_view_restrictions()` recreates such a snapshot on a page at its new location. Only `can_view` is carried over, so the editing privileges attached to the original rows are never imported, and grants the page already inherits at its new position with at least the same scope are not duplicated. Permission caches are invalidated after bulk permission creation.

  • Copy: unreadable descendants cannot be copied without permission copying; they may be copied with permissions when destination view/change grants will not make them readable to the copying editor; unsafe copies are rejected before any page or plugin is created; the copied root receives its direct permission records when requested; restrictions inherited from ancestors outside the subtree are materialized on the copied root with equivalent scope. Descendant restrictions continue to protect later additions; immediate-child grants applying only to the source root do not expand to its descendants.
  • Duplicate: the duplicate carries the source's view restrictions, its own and the inherited ones, and no other permission flag.
  • Move: `Page.move_page` snapshots the inherited view restrictions before the tree move and materializes them on the moved page afterwards, so the subtree stays as restricted as it was; it accepts an optional `user` argument for cache invalidation. `PageAdmin.move_page` additionally authorizes the whole subtree and refuses the move when it contains pages the editor may not view and the destination's own grants would make them readable.

`cms.utils.page_permissions.user_can_relocate_descendants()` implements that destination test once, with `user_can_copy_descendants()` and `user_can_move_descendants()` as the operation-named wrappers.

A consequence worth documenting for operators: a page moved out of a restricted branch stays restricted at its new location, and publishing it becomes a deliberate act that requires the *can change permissions* right on the page.

Destination permissions continue to follow django CMS's existing additive permission model. This change does not promise that copying or moving a subtree to a different location produces an identical audience for every other user.

Workarounds

Until a patched release is available, disable the page-tree copy, duplicate and move endpoints for untrusted delegated editors, or temporarily remove their ability to add pages. Hiding the UI alone does not block a direct POST. Selecting Copy permissions alone is insufficient on affected versions.

Validation and scope

All defects were independently reproduced on checkout `94e3cfc13` (django CMS `5.2.0dev1`, Django `6.0.5`, Python `3.14`) using the project test harness without djangocms-versioning, and are covered by regression tests in `cms/tests/test_copy_permissions.py`. The affected source patterns were inspected in local tags 5.1.2 and 5.0.11; those releases were not independently runtime-tested in this review. I assume versions at least since 3.5 are affected.

The Copy defects were reported by @euriconicacio. The Duplicate and Move defects were found in a follow-up review of the same class of defect and are included here because they share the root cause, the prerequisites and the fix.

Two related behaviors were examined and are *not* part of this advisory. Page deletion authorizes every page it collects individually, including descendants, so it is not affected. The admin page tree and the page-link autocomplete list every page on a site to any staff user who can edit at least one page, which is documented, intended behavior; page titles and URLs are not concealed from staff editors by view restrictions.

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:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
django-cms≤ 5.1.2
django-cms≤ 5.0.11
5.0.11
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-976q-w6ch-6w82

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