GHSA-79VF-XH44-8CPM
Staff users can read plugin content from placeholders they have no permission for via an unscoped plugin_parent in the move-plugin endpoint
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 5.0.12 | django-cms · -1 d desde divulgación | |
| Remediación | Parche 5.1.3 | django-cms · -1 d desde divulgación | |
| Divulgación | Publicada | GHSA-79VF-XH44-8CPM divulgada · CVSS 5.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A staff user with permission to edit a single placeholder can read the rendered content of any plugin in the installation, including plugins on pages and in clipboards they have no permission for. The same request also creates a plugin whose parent lies outside its own placeholder, corrupting the plugin tree.
Details
The `move-plugin` admin endpoint accepts a client-supplied `plugin_parent`. That id was resolved against the target placeholder only on the *move* path; the *paste* (`move_a_copy`) and *cut* paths fell through to an unscoped lookup:
if move_a_plugin:
target_parent = get_object_or_404(
CMSPlugin, pk=parent_id, language=target_language, placeholder=target_pl,
)
else:
target_parent = get_object_or_404(CMSPlugin, pk=parent_id) # any plugin`_paste_plugin()` checks the source placeholder, the target placeholder and `target_placeholder.check_source()`. None of these covers the *parent's* placeholder, and `check_source()` is not a page-permission gate in any case: `PageContent.placeholders` is declared as a plain `PlaceholderRelationField()` with no checks, so it returns `True` for every page placeholder.
`copy_plugins_to_placeholder()` then writes the copy with `placeholder = <target>` but `parent = <attacker-supplied plugin>`. The view finishes by rendering the response from the new plugin's parent:
root = (new_plugin.parent or new_plugin)
new_plugins = [root] + list(root.get_descendants())
data = get_plugin_tree(request, new_plugins, target_plugin=new_plugins[0])so the foreign parent and its entire subtree are rendered and returned to the caller with HTTP 200.
The `add-plugin` endpoint validates the parent correctly (`PluginAddValidationForm.clean` rejects a parent in another placeholder or language); `move-plugin` was the outlier.
Impact
An authenticated staff user needs plugin add/change permissions and change permission on one placeholder they legitimately control — the ordinary editor role. From there:
- Disclosure. `plugin_parent` accepts any `CMSPlugin` primary key, and ids are sequential integers, so the attacker can walk the whole table and have each subtree rendered back. This reaches pages they have no permission for, pages belonging to other sites in a multisite installation, and other users' clipboards.
- Integrity. The created plugin is parented outside its own placeholder.
The integrity impact is contained: the render path groups children by parent_id` within a single placeholder's plugin list, so the injected plugin never attaches to the victim's tree and does not appear on the victim's page. It is an orphan in the attacker's own placeholder. This is not content injection into restricted pages.
There is no anonymous vector.
Patches
The parent lookup is now scoped to the target placeholder and language on all paths. A neighbouring case was fixed at the same time: when a plugin moved to a different placeholder and `plugin_parent` named its existing parent, that parent was carried along, producing the same cross-placeholder link without the permission bypass.
if parent_id and plugin.parent_id != parent_id:
target_pl = placeholder or plugin.placeholder
target_parent = get_object_or_404(
CMSPlugin, pk=parent_id, language=target_language, placeholder=target_pl,
)
elif parent_id and placeholder is None:
target_parent = plugin.parent
else:
target_parent = NoneUpgrade to 5.0.12 or 5.1.3.
Releases before 5.0 are affected by the same flaw, which has been present since 3.0. Those lines are out of support and will not receive a patch; if you are running one, upgrade to a supported release.
Workarounds
None at configuration level; the endpoint cannot be disabled without breaking the structure board. Until you can upgrade, limit staff accounts with plugin permissions to trusted users.
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.0.12, 5.1.3 | -1 d · -1 d | 5.1.3 no afectada |
5.0.125.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-79vf-xh44-8cpmLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
