Nov 19, 2026·10 min read·2 visits
Authenticated staff users in djangocms-versioning prior to 2.6.1 can bypass object-level permissions via the discard_view and edit_redirect_view administrative endpoints. By supplying arbitrary version primary keys, an unauthorized staff user can permanently delete draft content objects or generate editable drafts from restricted published content.
An authorization bypass and broken object-level access control vulnerability exists in djangocms-versioning prior to version 2.6.1. The check_discard and check_edit_redirect condition pipelines on the Version model omitted the user_can_change permission predicate. Because the corresponding administrative views retrieve target versions directly by their URL primary key and depend entirely on these condition pipelines for object-level access control, authenticated staff users without per-object change permissions can permanently delete draft versions or spawn new draft versions from published content.
djangocms-versioning is the standard content lifecycle and state management package for django CMS 4 and later releases. It introduces a generalized versioning wrapper around CMS content objects (such as page contents, blog posts, or polls), tracking states across DRAFT, PUBLISHED, UNPUBLISHED, and ARCHIVED. To manage these transitions, the package registers specialized administrative endpoints through VersionAdmin, exposing state-modification handlers over the Django administrative web interface.
Each administrative state transition in djangocms-versioning is governed by a declarative condition pipeline defined on the djangocms_versioning.models.Version model. When a user invokes a state transition endpoint—such as archiving, reverting, discarding, or redirecting to edit a content object—the corresponding view retrieves the Version record via the primary key supplied in the URL and evaluates its Conditions list. The view relies on this condition list to verify that the version is in a valid starting state, is not locked by another user, and that the requesting user possesses the required modification privileges.
In versions of djangocms-versioning prior to 2.6.1, the condition pipelines for check_discard and check_edit_redirect failed to include the user_can_change authorization check. This flaw is classified under CWE-639 (Authorization Bypass Through User-Controlled Key) and CWE-862 (Missing Authorization). While the administrative endpoints require the user to be authenticated as a Django staff member (request.user.is_staff == True), they do not enforce model-level or object-level change permissions prior to executing the state transition.
As a consequence, any authenticated staff user can submit crafted HTTP POST requests containing arbitrary Version primary keys to VersionAdmin.discard_view or VersionAdmin.edit_redirect_view. Through discard_view, an unauthorized staff member can permanently delete draft versions and their underlying content objects from the database. Through edit_redirect_view, the same user can force the creation of a new editable draft from a published content object that they are forbidden from modifying.
The root cause of CVE-2026-69138 lies in an incomplete security predicate definition within djangocms_versioning/models.py. In the djangocms-versioning architecture, the Version model encapsulates state validation logic using instances of the Conditions class. A Conditions object holds an iterable of callable test functions that each accept a Version instance and a User object, raising a ConditionFailed exception if any check fails.
To enforce authorization across django CMS's two permission models—global Django model permissions when CMS_PERMISSION = False and granular per-object permissions when CMS_PERMISSION = True—the codebase defines the user_can_change helper predicate. When invoked inside a condition pipeline, user_can_change delegates the authorization check directly to the underlying content object by calling version.content.has_change_permission(user). Sibling transition pipelines on the Version model, specifically check_archive and check_revert, properly included user_can_change as their initial validation step.
However, the check_discard and check_edit_redirect condition lists omitted user_can_change. The check_discard pipeline only verified in_state([constants.DRAFT], not_draft_error) and is_not_locked(lock_error_message). Similarly, check_edit_redirect only checked in_state([constants.DRAFT, constants.PUBLISHED], ...) and draft_is_not_locked(lock_draft_error_message).
Because the administrative views VersionAdmin.discard_view and VersionAdmin.edit_redirect_view are wrapped solely by Django's standard admin_view decorator, the framework only validates that the requester has is_staff=True before entering the view function. Inside the views, the application fetches the target Version object using the user-supplied primary key from the URL route and calls version.check_discard(request.user) or version.check_edit_redirect(request.user). With user_can_change absent from both condition pipelines, the views executed state mutations without performing any model-level or object-level permission verification.
> [!NOTE]
> The vulnerability affects deployments differently depending on the CMS_PERMISSION setting. When CMS_PERMISSION = True, the views were gated only by is_staff, allowing a staff user with zero model or object permissions to target any version ID. When CMS_PERMISSION = False (the default), a staff user holding global change permissions on a subset of objects could still modify or delete restricted objects belonging to other scopes or authors.
In versions prior to 2.6.1, djangocms_versioning/models.py defined the transition rules for Version instances without consistent permission predicates across all state transitions. While check_archive and check_revert explicitly invoked user_can_change, check_discard and check_edit_redirect relied exclusively on state and lock validation:
# VULNERABLE CODE: djangocms_versioning/models.py (prior to 2.6.1)
check_archive = Conditions(
[
user_can_change(_("You do not have change permissions")),
in_state([constants.DRAFT], _("Version is not in draft state")),
is_not_locked(lock_error_message),
]
)
check_revert = Conditions(
[
user_can_change(_("You do not have change permissions")),
in_state(
[constants.ARCHIVED, constants.UNPUBLISHED],
_("Version is not in archived or unpublished state"),
),
]
)
check_discard = Conditions(
[
in_state([constants.DRAFT], not_draft_error),
# VULNERABILITY: Missing user_can_change predicate
is_not_locked(lock_error_message),
]
)
check_edit_redirect = Conditions(
[
in_state(
[constants.DRAFT, constants.PUBLISHED],
_("Version is not in draft or published state"),
),
# VULNERABILITY: Missing user_can_change predicate
draft_is_not_locked(lock_draft_error_message),
]
)Commit d8c570daa5f7805e8be51f15545fe77b24c44daf (merged via Pull Request #573) resolves the vulnerability by centralizing the permission error message into change_permission_error and inserting user_can_change(change_permission_error) into both check_discard and check_edit_redirect:
--- a/djangocms_versioning/models.py
+++ b/djangocms_versioning/models.py
@@ -32,6 +32,7 @@
not_draft_error = _("This version is not a draft: to make changes create a new draft")
lock_error_message = _("The latest version is locked by {user}")
lock_draft_error_message = _("The draft version is locked by {user}")
+change_permission_error = _("You do not have change permissions")
permission_error_message = _("You do not have permission to perform this action")
@@ -305,7 +306,7 @@ def copy(self, created_by):
check_archive = Conditions(
[
- user_can_change(_("You do not have change permissions")),
+ user_can_change(change_permission_error),
in_state([constants.DRAFT], _("Version is not in draft state")),
is_not_locked(lock_error_message),
]
@@ -525,7 +526,7 @@ def _has_permission(self, perm: str, user) -> bool:
)
check_revert = Conditions(
[
- user_can_change(_("You do not have change permissions")),
+ user_can_change(change_permission_error),
in_state(
[constants.ARCHIVED, constants.UNPUBLISHED],
_("Version is not in archived or unpublished state"),
@@ -536,6 +537,7 @@ def _has_permission(self, perm: str, user) -> bool:
check_discard = Conditions(
[
in_state([constants.DRAFT], not_draft_error),
+ user_can_change(change_permission_error),
is_not_locked(lock_error_message),
]
)
@@ -545,6 +547,7 @@ def _has_permission(self, perm: str, user) -> bool:
[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),
]
)The patch is complete and directly addresses the root cause at the model layer. By placing user_can_change(change_permission_error) directly inside the Version model's condition pipelines rather than only patching the VersionAdmin view handlers, any internal code or UI helper that checks version.check_discard.as_bool(user) or version.check_edit_redirect.as_bool(user) (such as template tags rendering action buttons in the admin list view) also respects the updated authorization rule.
In addition to the model fix, the commit expanded tests/test_permissions.py with four unit tests (test_discard_view_cannot_be_accessed_without_permission, test_discard_view_can_be_accessed_with_permission, test_edit_redirect_view_cannot_be_accessed_without_permission, and test_edit_redirect_view_can_be_accessed_with_permission). These tests confirm that unprivileged staff requests to both endpoints fail with the "You do not have change permissions" error message and leave the database state intact.
Exploiting CVE-2026-69138 requires the attacker to possess an authenticated session with Django staff privileges (is_staff=True) and a valid CSRF token. No specialized network positioning or race conditions are required. Because Version primary keys are sequential integers in standard relational database deployments, an attacker can enumerate or guess target version_id values across registered versionable proxy models.
discard_viewIn djangocms-versioning, discarding a draft does not merely transition the version state; it executes version.delete(), which deletes both the Version record and the underlying content model instance from the database. An attacker without change permissions on a specific content type (for example, blogpostcontent) can target a known or enumerated draft version ID by sending a POST request with the discard=1 confirmation parameter:
POST /admin/djangocms_versioning/blogpostcontentversion/42/discard/ HTTP/1.1
Host: cms.example.com
Cookie: sessionid=<valid_staff_session>; csrftoken=<valid_csrf_token>
Content-Type: application/x-www-form-urlencoded
discard=1&csrfmiddlewaretoken=<valid_csrf_token>When the server processes this request, VersionAdmin.discard_view retrieves Version object 42 and executes version.check_discard(request.user). As long as version 42 is in the DRAFT state and is not currently locked by another user, the condition check passes and the server permanently removes the draft content object.
edit_redirect_viewWhen a content object is in the PUBLISHED state, modifications require creating a new DRAFT version cloned from the published content object. The edit_redirect_view endpoint automates this workflow: if called on a PUBLISHED version, it copies the published content into a new DRAFT version and redirects the user to the change form for the new draft. An unauthorized staff user can trigger this state mutation against a restricted published version:
POST /admin/djangocms_versioning/blogpostcontentversion/15/edit_redirect/ HTTP/1.1
Host: cms.example.com
Cookie: sessionid=<valid_staff_session>; csrftoken=<valid_csrf_token>
Content-Type: application/x-www-form-urlencoded
csrfmiddlewaretoken=<valid_csrf_token>Even if the attacker cannot subsequently access the target model's standard Django change form due to view-level permission checks on the destination URL, the POST request to edit_redirect_view has already committed a new DRAFT version to the database. Because djangocms-versioning only allows one active draft per content grouping at a time, spawning an unauthorized draft funded by the attacker's user account can lock or obstruct legitimate editors from initiating their own draft workflows.
CVE-2026-69138 carries a CVSS v3.1 base score of 6.5 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H. The High Privileges Required (PR:H) metric reflects that the attacker must already possess an authenticated staff account capable of accessing the Django admin interface. Once authenticated, the attack complexity is low (AC:L) and requires no user interaction (UI:N).
Confidentiality is unaffected (C:N) because neither discard_view nor edit_redirect_view returns the body or serialized fields of the underlying content object in the HTTP response when an unauthorized user lacks view permissions on the target change form. The responses consist of HTTP 302 redirects and status messages.
The primary impact falls on Integrity (I:H) and Availability (A:H). Regarding availability, invoking discard_view destroys work-in-progress draft content objects irremediably unless database backups are restored. In multi-tenant or multi-department editorial environments where low-privileged staff accounts (such as contributors restricted to specific site sections or poll modules) coexist with senior editors, a low-privileged staff user can wipe out unapproved drafts across the entire CMS.
Regarding integrity, invoking edit_redirect_view against PUBLISHED versions alters the versioning state machine by instantiating unauthorized DRAFT copies of protected content. This violates the object-level isolation boundaries expected when CMS_PERMISSION = True is enabled, polluting the revision history and disrupting editorial workflows.
Organizations running djangocms-versioning should upgrade to version 2.6.1 or later immediately. Version 2.6.1 incorporates commit d8c570daa5f7805e8be51f15545fe77b24c44daf, which enforces user_can_change across both the check_discard and check_edit_redirect pipelines. The package can be updated via pip:
pip install --upgrade "djangocms-versioning>=2.6.1"If an immediate package upgrade is not feasible, administrators can implement temporary defensive controls at the application or reverse-proxy layer. Within the Django project, operators can subclass or monkey-patch Version.check_discard and Version.check_edit_redirect inside an application's AppConfig.ready() method to append user_can_change to the existing Conditions lists at startup.
# Temporary workaround in an app's apps.py ready() method
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class CustomSecurityPatchConfig(AppConfig):
name = "custom_security_patch"
def ready(self):
from djangocms_versioning.models import Version, user_can_change
error_msg = _("You do not have change permissions")
Version.check_discard.conditions.insert(1, user_can_change(error_msg))
Version.check_edit_redirect.conditions.insert(1, user_can_change(error_msg))Additionally, administrators should audit all Django user accounts where is_staff=True to verify that staff status is granted strictly to trusted personnel. Web application firewalls (WAFs) and reverse proxies can also be configured to monitor or rate-limit HTTP POST requests matching the URL pattern /admin/*/*version/*/discard/ and /admin/*/*version/*/edit_redirect/ to detect automated primary key enumeration by staff sessions.
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
djangocms-versioning django-cms | < 2.6.1 | 2.6.1 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-69138 (GHSA-5g9x-qwh5-33x4) |
| CWE Classification | CWE-639 (Authorization Bypass Through User-Controlled Key) / CWE-862 (Missing Authorization) |
| CVSS v3.1 Score | 6.5 Medium (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H) |
| Attack Vector | Network (Authenticated Staff HTTP POST to VersionAdmin endpoints) |
| Affected Component | djangocms_versioning.models.Version (check_discard & check_edit_redirect) |
| Security Impact | Permanent deletion of arbitrary draft content objects and unauthorized creation of drafts from published content |
| Patched Version | djangocms-versioning 2.6.1 |
| CISA KEV Status | Not Listed |
The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.
A denial-of-service vulnerability (CWE-400) exists in PGPainless versions prior to 1.7.8 and 2.0.x prior to 2.0.4 within the MessageInspector and InlineDetachImpl components. These components manually iterate over OpenPGP packet streams without enforcing the global 16-layer maximum nesting limit (MAX_LAYER_DEPTH). An unauthenticated remote attacker can supply a specially crafted OpenPGP message containing deeply nested PGPCompressedData packets to trigger unbounded recursive decompression, resulting in CPU starvation and Java Virtual Machine (JVM) heap exhaustion.
A missing authorization vulnerability exists in django-filer versions prior to 3.5.0 when the optional per-folder permission system (FILER_ENABLE_PERMISSIONS) is enabled. The bulk delete admin action (delete_files_or_folders) verifies global Django model-level deletion permissions but fails to enforce object-level FolderPermission edit checks. Consequently, an authenticated staff user holding model-level delete rights can delete files, folders, and directory trees from folders where their access has been explicitly restricted to read-only via FolderPermission.
CVE-2026-75506 (GHSA-vc6p-m6vx-6cwq) is a second-order OS command injection vulnerability in OliveTin affecting versions 3000.0.0 prior to 3000.18.1. The post-execution hook mechanism, shellAfterCompleted, interpolates runtime execution outputs and username variables directly into a shell command string passed to sh -c without validation. When an action emits untrusted output containing shell metacharacters, those metacharacters break out of the intended syntax and execute arbitrary OS commands under the context of the OliveTin service process.
CVE-2026-71481 (GHSA-82w8-65qw-gch6) is a cryptographic signature verification bypass (CWE-347) in the altcha-org/altcha PHP library affecting versions 2.0.0 through 2.0.2. Due to a flawed conditional check in the verifySolution method, omitting the signature field from a submitted challenge payload causes the server to skip HMAC verification entirely, even when a server-side HMAC secret is configured. Unauthenticated remote attackers can exploit this flaw to self-issue low-difficulty Proof-of-Work challenges, solve them with trivial effort, and bypass CAPTCHA controls.
CVE-2026-61618 (GHSA-265x-v3qf-ff6p) is an improper input validation vulnerability (CWE-20) in Axiom Crypto's snark-verifier library prior to version 0.2.5. The library decodes KZG accumulator public-instance limbs without enforcing canonical bit-width bounds prior to elliptic curve coordinate reconstruction. In the Ethereum Virtual Machine (EVM) loader path, the generated Yul bytecode validates that reconstructed affine coordinates lie on the elliptic curve, but fails to verify that the constituent limbs respect their allocated bit-widths, allowing non-canonical proof representations. In the native Rust execution path, accumulator decoding relies on unchecked assertions and unwraps, allowing malformed public instances to trigger an unhandled process panic.
An OS command injection vulnerability (CWE-78) exists in the @augment-vir/node package prior to version 31.73.5. The grep() utility function builds a shell command string by interpolating caller-supplied search patterns inside double quotes and executes the string through bash via runShellCommand(). Because bash evaluates command substitution expressions inside double-quoted strings, an attacker controlling the search pattern input can execute arbitrary OS commands with the privileges of the Node.js runtime.