MEDIUM · CVSS 3.1 6.5 EPSS 0.6% · 40th percentile CWE-639CWE-862

CVE-2026-69138: djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization

Published 2026-11-18 · Updated 2026-11-18 · Also known as GHSA-5g9x-qwh5-33x4

Summary

A vulnerability in djangocms-versioning allows low-privileged staff users to perform unauthorized version state transitions, such as discarding draft content or creating editable drafts, via insecure direct object references. Multi-editor deployments using djangoCMS should update to the patched release immediately.

Who is affected

Affected systems include multi-editor deployments using djangocms-versioning where staff users hold differentiated per-object permissions. Under CMS_PERMISSION = True, authorization for the discard and edit_redirect actions was effectively reduced to mere staff status, allowing attackers to delete arbitrary draft versions and their underlying content objects or create unauthorized drafts from published content.

Exploitability

The vulnerability carries a CVSS 3.1 base score of 6.5 (MEDIUM) with a vector of CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H, indicating it is network-exploitable with low complexity, requires high privileges, and impacts integrity and availability. EPSS is not yet available, and CISA Known Exploited Vulnerabilities status is no.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
PyPI djangocms-versioning >= 0, < 2.6.1 2.6.1 python -m pip install 'djangocms-versioning>=2.6.1'

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredHigh
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityHigh
AvailabilityHigh

FAQ

What causes the authorization bypass in djangocms-versioning?

The discard and edit_redirect version transitions omitted the per-object user_can_change permission check present in other transitions, allowing any staff user to access these actions by supplying an arbitrary version primary key.

What permissions are required to exploit this flaw?

An attacker needs is_staff access. Under CMS_PERMISSION = True, authorization for the affected operations was reduced to basic staff status.

Are configuration workarounds available to fix this issue without upgrading?

No configuration-only workaround exists; operators must restrict staff accounts or upgrade to version 2.6.1 or later.

Original advisory description
## Summary The `discard` and `edit_redirect` version transitions did not enforce a per-object change-permission check, while the sibling transitions (`archive`, `publish`, `unpublish`, `revert`) all did. As a result a low-privileged staff user could **discard (delete) any draft version - and thereby the underlying content object - of content they have no change permission on**, and could create an editable draft off any published version, by supplying a version primary key they should not have access to (an insecure direct object reference). ## Details Version state transitions are guarded by `Conditions` objects declared on `djangocms_versioning.models.Version`. Every transition that mutates content carries the `user_can_change` condition, which delegates to the *content* object's own permission check (`Version.has_change_permission` → `content.has_change_permission` / `has_placeholder_change_permission`, with a final fallback to the Django `change_<model>` permission). Two conditions were missing that check: ```python # Before (vulnerable) check_discard = Conditions([ in_state([constants.DRAFT], not_draft_error), is_not_locked(lock_error_message), ]) check_edit_redirect = Conditions([ in_state([constants.DRAFT, constants.PUBLISHED], _("Version is not in draft or published state")), draft_is_not_locked(lock_draft_error_message), ]) ``` The corresponding admin views authorize **only** through these conditions: * `VersionAdmin.discard_view` / `VersionAdmin.edit_redirect_view` fetch the target with the stock `ModelAdmin.get_object`, which is backed by the **unfiltered** default queryset - no per-user or per-grouper scoping. * The views are registered with `admin_site.admin_view`, which enforces only `is_staff`. * `discard_view` deletes the version directly via `version.delete()` and never consults `VersionAdmin.has_delete_permission` (which otherwise delegates to the content admin and honors `ALLOW_DELETING_VERSIONS`). Because the only per-object gate for these two operations was the `Conditions` list, and that list omitted `user_can_change`, any staff user could invoke the operation on any version by its primary key. The changelist action buttons are disabled in the UI via `check_discard.as_bool` / `check_edit_redirect.as_bool`, but that is a client-side affordance only and does not protect the directly reachable admin URLs. ## Impact * **Type:** Broken access control / missing authorization (IDOR). * **Who is affected:** Multi-editor deployments where staff users hold differentiated per-object permissions. * Under `CMS_PERMISSION = True`, authorization for these two operations was effectively reduced to `is_staff`, so any staff user could discard or edit-redirect any version. * Under the default `CMS_PERMISSION = False`, it degrades to the global `change_<model>` permission (e.g. `cms.change_page`) - weaker than the intended per-object check, but not absent. * **Consequence:** Unauthorized deletion of draft versions and their content objects (integrity/availability of content), and unauthorized creation of drafts from published content. ## Patches Fixed by adding the `user_can_change` condition to both `check_discard` and `check_edit_redirect`, restoring parity with the other content-mutating transitions: ```python # After (fixed) check_discard = Conditions([ in_state([constants.DRAFT], not_draft_error), user_can_change(change_permission_error), is_not_locked(lock_error_message), ]) check_edit_redirect = Conditions([ in_state([constants.DRAFT, constants.PUBLISHED], _("Version is not in draft or published state")), user_can_change(change_permission_error), draft_is_not_locked(lock_draft_error_message), ]) ``` `discard` intentionally requires **change** permission (not delete): it is treated as undoing changes to a draft. Upgrade to `djangocms-versioning` `2.6.1` or later. ## Workarounds There is no configuration-only workaround. Operators who cannot upgrade immediately should restrict staff accounts to trusted users, since the missing gate reduces to `is_staff` under `CMS_PERMISSION = True`.

References

Source records: GHSA-5g9x-qwh5-33x4 (OSV.dev) · EPSS by FIRST, 2026-11-26.