GHSA-PPQV-H89F-6Q9P
django CMS wizard permits cross-site page creation through an unvalidated parent
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 5.1.3 | django-cms · -1 d desde divulgación | |
| Divulgación | Publicada | GHSA-PPQV-H89F-6Q9P divulgada · CVSS 4.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The django CMS page-creation wizard accepts an origin page from another Django Site and can authorize creation against the current site's permissions while attaching the new page to a parent on the other site.
Impact
In a multi-site installation with `CMS_PERMISSION = True`, an authenticated, active staff user with Django `cms.add_page` and `cms.change_page` permissions and a `GlobalPagePermission` granting add/change only on Site 1 can create a Site 1 page whose parent belongs to Site 2, despite having no permission to add children to that parent on Site 2.
This violates the site authorization boundary and page-tree integrity. The confirmed impact is unauthorized page insertion with inconsistent site/parent relationships. No cross-site content disclosure, modification or deletion of existing page content, remote code execution, or availability impact has been established.
Affected versions — investigation in progress
Reproduced end to end against django CMS `5.2.0dev1`, source commit `4c823f233aaa0d1f6d63f13b413003b8f09b4214`.
Source inspection of the local `5.1.2` release tag found the same problematic permission-check pattern. That release has not yet been tested end to end. The `5.0.11` implementation differs and its affected status has not been established. The structured affected-version range is intentionally unset until release-line verification is complete; do not interpret the confirmed development version as the complete affected range.
Root cause
- `WizardStep1Form.page` accepts pages from all sites.
- `WizardCreateView.get_form_kwargs()` resolves the client-supplied origin page without restricting it to the current site.
- `CMSPageWizard.user_has_add_permission()` can check the foreign parent using the current site supplied by the wizard.
- `CreateCMSPageForm.clean_parent_page()` overrides the base form's parent-site validation and calls `user_can_add_subpage(..., site=self._site)` without checking that the parent belongs to that site.
- Saving creates `Page(site=self._site, parent=parent_page)`, persisting the cross-site relationship.
Reproduction
Using Django's test client and an isolated test database:
- Enable `CMS_PERMISSION` and configure English on Sites 1 and 2. Create a local page on Site 1, and a parent plus child on Site 2.
- Create a non-superuser staff writer with Django `cms.add_page` and `cms.change_page` permissions. Grant CMS global add/change permissions only on Site 1.
- Verify that `user_can_add_subpage(writer, foreign_parent, site=site_2)` returns `False`.
- On a Site 1 request, POST to `admin:cms_wizard_create` with `wizard_create_view-current_step=0`, `0-entry=cms_page_wizard.id`, `0-language=en`, and `0-page` set to the Site 2 child ID.
- POST step 1 with a new `1-title`, `1-slug`, and empty `1-content`.
- Observe that the new page has `site_id=site_1.pk` and `parent_id=foreign_parent.pk`, while its parent's `site_id` is Site 2.
The confirmed attack uses the new-page/sibling wizard. Both sibling and subpage creation forms require the parent-site invariant.
Patch status
A fix is prepared in local commit `50d3c2f39`:
- Restrict origin-page lookup and step-0 field validation to the current site.
- Reject a parent belonging to another site before checking add permission in the creation form, including for superusers and installations with CMS per-page permissions disabled.
Regression coverage verifies rejection of the cross-site origin, attempted direct submission of the next step, direct use of both creation forms with CMS permissions enabled and disabled, and successful same-site creation by a scoped writer.
Validation: 54 tests and four subtests passed across the wizard, wizard-registration, and log-entry test modules; Ruff and whitespace checks passed.
Patched release versions and any necessary backports are pending. This draft is not a release announcement.
Workaround
Until a patched release is available, administrators can temporarily remove the Django `cms.add_page` permission from site-scoped staff who must not create pages across site boundaries. This also prevents their legitimate page creation. Hiding the wizard's UI alone does not block direct requests.
Severity
CWE-863: Incorrect Authorization.
Provisional CVSS 3.1: 4.3 (Medium) — `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N`.
Credit
Reported privately by doanmanhducz.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypidjango-cms |
Corregida | 5.1.3 | -1 d | 5.1.3 no afectada |
5.1.3Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/django-cms/django-cms/security/advisories/GHSA-ppqv-h89f-6q9pLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
