Home/Research/Post

GHSA-5g9x-qwh5-33×4: djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization

  • Severity: MEDIUM
  • CVE: CVE-2026-69138
  • Ecosystems: pip
  • Packages: djangocms-versioning

## 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_` 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_vi…

Source: GitHub Security Advisories · 2026-11-18