Vulnerabilities in pkg:pypi/djangocms-versioning
PACKAGECVE-2026-69138 is a MODERATE (CVSS 6.5) authorization bypass through user-controlled key vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting djangocms-versioning libraries in the PyPI ecosystem. The issue involves authorization bypass through user-controlled key and missing authorization. Remediation is available by upgrading affected packages to version 2.6.1.
pkg:pypi/djangocms-versioning
Vulnerability advisories affecting package pkg:pypi/djangocms-versioning. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-5g9x-qwh5-33x4 | CVE-2026-69138 | MODERATE | djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization |
CVE-2026-69138 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H).
How to Fix CVE-2026-69138
To remediate this vulnerability, upgrade all affected djangocms-versioning dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install djangocms-versioning>=2.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show djangocms-versioning
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-69138, inspect your installed packages using pip:
pip show djangocms-versioning
Analyze the terminal output to locate any version of djangocms-versioning in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.1), your application is affected.
Note: The pip show djangocms-versioning command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-639: Authorization Bypass Through User-Controlled Key, where 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. In djangocms-versioning, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-69138 Affected djangocms-versioning Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
djangocms-versioning
|
PyPI |
< 2.6.1
|
2.6.1
|
References
Frequently Asked Questions
What is CVE-2026-69138?
Which djangocms-versioning versions are affected?
What version fixes CVE-2026-69138?
Is djangocms-versioning affected?
What is the CVSS score of CVE-2026-69138?
What CWE is associated with CVE-2026-69138?
How can I check PyPI dependencies for CVE-2026-69138?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5g9x-qwh5-33x4",
"modified" : "2026-11-18T21:19:05Z",
"published" : "2026-11-18T21:19:04Z",
"aliases" : [ "CVE-2026-69138" ],
"summary" : "djangocms-versioning: Authorization Bypass Through User-Controlled Key and Missing Authorization",
"details" : "## 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_<model>` permission).\n\nTwo conditions were missing that check:\n\n```python\n# Before (vulnerable)\ncheck_discard = Conditions([\n in_state([constants.DRAFT], not_draft_error),\n is_not_locked(lock_error_message),\n])\ncheck_edit_redirect = Conditions([\n in_state([constants.DRAFT, constants.PUBLISHED], _(\"Version is not in draft or published state\")),\n draft_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_<model>` permission (e.g. `cms.change_page`) — weaker than the intended per-object check, but not absent.\n* **Consequence:** Unauthorized deletion of draft versions and their content objects (integrity/availability of content), and unauthorized creation of drafts from published content.\n\n## Patches\n\nFixed by adding the `user_can_change` condition to both `check_discard` and `check_edit_redirect`, restoring parity with the other content-mutating transitions:\n\n```python\n# After (fixed)\ncheck_discard = Conditions([\n in_state([constants.DRAFT], not_draft_error),\n user_can_change(change_permission_error),\n is_not_locked(lock_error_message),\n])\ncheck_edit_redirect = Conditions([\n in_state([constants.DRAFT, constants.PUBLISHED], _(\"Version is not in draft or published state\")),\n user_can_change(change_permission_error),\n draft_is_not_locked(lock_draft_error_message),\n])\n```\n\n`discard` intentionally requires **change** permission (not delete): it is treated as undoing changes to a draft.\n\nUpgrade to `djangocms-versioning` `2.6.1` or later.\n\n## Workarounds\n\nThere 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`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "djangocms-versioning"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.6.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.6.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/django-cms/djangocms-versioning/security/advisories/GHSA-5g9x-qwh5-33x4"
}, {
"type" : "WEB",
"url" : "https://github.com/django-cms/djangocms-versioning/pull/573"
}, {
"type" : "WEB",
"url" : "https://github.com/django-cms/djangocms-versioning/commit/d8c570daa5f7805e8be51f15545fe77b24c44daf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/django-cms/djangocms-versioning"
}, {
"type" : "WEB",
"url" : "https://github.com/django-cms/djangocms-versioning/releases/tag/2.6.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-639", "CWE-862" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-18T21:19:04Z",
"nvd_published_at" : null
}
}