{"vuln_id":"GHSA-5g9x-qwh5-33x4","aliases":["CVE-2026-69138"],"description":"djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization","published_at":"2026-11-18T21:19:04Z","modified_at":"2026-11-18T21:30:21.173085Z","first_seen_at":"2026-11-21T19:15:20.145602Z","severity":"medium","severity_source":"ghsa","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H","cwe":["CWE-639","CWE-862"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-5g9x-qwh5-33x4"},"matched_alias":null,"items":[{"id":10734,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-5g9x-qwh5-33x4: djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization","summary":"djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization\n\n## Summary\n\nThe `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).\n\n## Details\n\nVersion 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_\n` permission).\n\nTwo conditions were missing that check:\n\n```python\n# Before (vulnerable)\ncheck_discard = Conditions([\nin_state([constants.DRAFT], not_draft_error),\nis_not_locked(lock_error_message),\n])\ncheck_edit_redirect = Conditions([\nin_state([constants.DRAFT, constants.PUBLISHED], _(\"Version is not in draft or published state\")),\ndraft_is_not_locked(lock_draft_error_message),\n])\n```\n\nThe corresponding admin views authorize **only** through these conditions:\n\n* `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.\n* The views are registered with `admin_site.admin_view`, which enforces only `is_staff`.\n* `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`).\n\nBecause 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.\n\n## Impact\n\n* **Type:** Broken access control / missing authorization (IDOR).\n* **Who is affected:** Multi-editor deployments where staff users hold differentiated per-object permissions.\n* 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.\n* Under the default `CMS_PERMISSION = False`, it degrades to the global `change_\n` permission (e.g. `cms.change_page`) — weaker than the intended per-object check, but not absent.\n* **Consequence:** Unauthorized deletion\n\nAffected: PyPI:djangocms-versioning\n\nFixed in: 2.6.1\n\nReferences:\nhttps://github.com/django-cms/djangocms-versioning/security/advisories/GHSA-5g9x-qwh5-33x4\nhttps://github.com/django-cms/djangocms-versioning/pull/573\nhttps://github.com/django-cms/djangocms-versioning/commit/d8c570daa5f7805e8be51f15545fe77b24c44daf\nhttps://github.com/django-cms/djangocms-versioning\nhttps://github.com/django-cms/djangocms-versioning/releases/tag/2.6.1","url":"https://osv.dev/vulnerability/GHSA-5g9x-qwh5-33x4","published_at":"2026-11-18T21:19:04Z","updated_at":"2026-11-18T21:30:21.173085Z","fetched_at":"2026-11-21T19:15:55.946138Z","severity":"medium","cvss_score":6.5,"epss":0.00471,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"djangocms-versioning","vuln_id":"CVE-2026-69138","vuln_ids":["CVE-2026-69138","GHSA-5G9X-QWH5-33X4"],"tags":["osv","pypi","fix-available"],"cluster_id":2290,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10734","html":"https://vulnwatch.ve1ve2.com/item/10734"}},{"id":2429,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-5g9x-qwh5-33x4 / CVE-2026-69138: djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization","summary":"djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization\n\n## Summary\n\nThe `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).\n\n## Details\n\nVersion 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_\n` permission).\n\nTwo conditions were missing that check:\n\n```python\n# Before (vulnerable)\ncheck_discard = Conditions([\nin_state([constants.DRAFT], not_draft_error),\nis_not_locked(lock_error_message),\n])\ncheck_edit_redirect = Conditions([\nin_state([constants.DRAFT, constants.PUBLISHED], _(\"Version is not in draft or published state\")),\ndraft_is_not_locked(lock_draft_error_message),\n])\n```\n\nThe corresponding admin views authorize **only** through these conditions:\n\n* `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.\n* The views are registered with `admin_site.admin_view`, which enforces only `is_staff`.\n* `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`).\n\nBecause 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.\n\n## Impact\n\n* **Type:** Broken access control / missing authorization (IDOR).\n* **Who is affected:** Multi-editor deployments where staff users hold differentiated per-object permissions.\n* 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.\n* Under the default `CMS_PERMISSION = False`, it degrades to the global `change_\n` permission (e.g. `cms.change_page`) — weaker than the intended per-object check, but not absent.\n* **Consequence:** Unauthorized deletion\n\nAffected packages: pip:djangocms-versioning\nPatched: djangocms-versioning 2.6.1","url":"https://github.com/advisories/GHSA-5g9x-qwh5-33x4","published_at":"2026-11-18T21:19:04Z","updated_at":"2026-11-18T21:19:06Z","fetched_at":"2026-11-21T19:15:18.416829Z","severity":"medium","cvss_score":6.5,"epss":0.00471,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"djangocms-versioning","vuln_id":"CVE-2026-69138","vuln_ids":["CVE-2026-69138","GHSA-5G9X-QWH5-33X4"],"tags":["ghsa","pip","CWE-639","CWE-862"],"cluster_id":2290,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2429","html":"https://vulnwatch.ve1ve2.com/item/2429"}},{"id":8219,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-69138: djangocms-versioning is a general-purpose versioning package for django CMS 4 and later. Prior to 2.6.1, the check_discard and check_edit_redirect Conditions o…","summary":"djangocms-versioning is a general-purpose versioning package for django CMS 4 and later. Prior to 2.6.1, the check_discard and check_edit_redirect Conditions on djangocms_versioning.models.Version omit user_can_change, while VersionAdmin.discard_view and VersionAdmin.edit_redirect_view obtain a version by its primary key and rely on those conditions for object-level authorization. With CMS_PERMISSION set to True, the affected views are gated only by is_staff, allowing any staff user to select content without object-level change permission. With the default CMS_PERMISSION value of False, a staff user must also hold the global Django change_ permission, but that model-level permission does not enforce the intended per-object authorization, so the user can delete a draft version and its content object through discard or create an editable draft from a published version through edit_redirect even when the user cannot change that specific content object. This issue is fixed in version 2.6.1.\n\nReferences:\nhttps://github.com/django-cms/djangocms-versioning/commit/d8c570daa5f7805e8be51f15545fe77b24c44daf\nhttps://github.com/django-cms/djangocms-versioning/pull/573\nhttps://github.com/django-cms/djangocms-versioning/releases/tag/2.6.1\nhttps://github.com/django-cms/djangocms-versioning/security/advisories/GHSA-5g9x-qwh5-33x4","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-69138","published_at":"2026-11-18T21:18:01.227000Z","updated_at":"2026-11-19T15:17:41.930000Z","fetched_at":"2026-11-21T19:15:31.484010Z","severity":"medium","cvss_score":6.5,"epss":0.00471,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-69138","vuln_ids":["CVE-2026-69138","GHSA-5G9X-QWH5-33X4"],"tags":["CWE-639","CWE-862"],"cluster_id":2291,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/8219","html":"https://vulnwatch.ve1ve2.com/item/8219"}}]}