CVE-2026-75526: django CMS Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-hvq6-2r72-p2x7
CVSS 4.4
CWE-79
Published
Advisory Summary

CVE-2026-75526 is a MODERATE (CVSS 4.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting django CMS libraries in the PyPI ecosystem. The issue involves stored xss in edit-mode plugin exception rendering. Remediation is available by upgrading affected packages to version 5.0.9.

CVE-2026-75526 at a Glance

CVE Identifier CVE-2026-75526
GHSA Identifier GHSA-hvq6-2r72-p2x7
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product django CMS
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-75526

To remediate this vulnerability, upgrade all affected django CMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

django-cms fixed: 5.0.9
pip install django-cms>=5.0.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show django-cms

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-75526, inspect your installed packages using pip:

pip show django-cms

Analyze the terminal output to locate any version of django CMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.9), your application is affected.

Note: The pip show django-cms command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In django CMS, 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

## Summary When plugin rendering fails in edit mode, django CMS renders a `cms-rendering-exception` block so editors can see that a placeholder could not be rendered. Older code built that block's heading by interpolating the exception message, placeholder/source strings, and the failing plugin's short description directly into an HTML string, then returned the placeholder output as safe markup. If an editor could store HTML in data used by a plugin's `get_short_description()` (or in other values interpolated into the exception message), and that plugin later raised during edit-mode rendering, the payload was parsed as HTML in the staff user's browser. This is a stored XSS condition in the CMS editing context. ## Impact The vulnerable path is only reached when placeholder rendering catches a plugin rendering exception: ```python try: placeholder_content = "".join(plugin_content) except Exception as e: context["exc_info"] = sys.exc_info() placeholder_content = self.render_exception("rendering placeholder", context, placeholder, editable) ``` `render_exception()` constructs a `message` from values that can include stored content: - `value` - the exception message. - `placeholder` - the placeholder string representation. - `placeholder.source` - the source object string representation, such as page content. - `instance.get_short_description()` - plugin-provided summary text, often derived from plugin model fields. In the vulnerable implementation, that message was embedded directly into an HTML heading. The final placeholder content was later returned through `mark_safe`, so Django template autoescaping did not protect the heading. `settings.DEBUG` does not mitigate the issue: it only controls whether Django's traceback HTML is appended. The custom heading is rendered in edit mode regardless of `DEBUG`. ## Patch Escape the custom exception heading before returning it as safe placeholder markup. The current fixed code uses `format_html`, which escapes `message` before inserting it into the heading: ```python heading = format_html('<h2 class="cms-rendering-exception-title">{}</h2>', message) ``` The traceback HTML from `ExceptionReporter.get_traceback_html()` should remain separate from django CMS's custom heading; Django's traceback escaping does not protect additional HTML assembled by django CMS. ## Workarounds Until patched, reduce exposure by ensuring only fully trusted staff can edit plugins whose stored fields are included in `get_short_description()`, and fix or disable plugins that can be made to raise during edit-mode rendering. This is only a partial mitigation because the escaping bug is in the shared exception-rendering path. ## References - `cms/plugin_rendering.py` - `ContentRenderer.render_placeholder` - `cms/plugin_rendering.py` - `ContentRenderer.render_exception` - Fixed code: `heading = format_html('<h2 class="cms-rendering-exception-title">{}</h2>', message)` - Regression tests: `cms.tests.test_plugin_renderers.TestExceptionCatchers.test_exception_in_plugin_render_escapes_user_content_in_edit_mode`, `cms.tests.test_plugin_renderers.TestLegacyRendererExceptionCatcher.test_exception_in_plugin_render_escapes_user_content_in_edit_mode`

CVE-2026-75526 Affected django CMS Versions

1 component(s)
Fixed Versions:
5.0.9
Product / Package Ecosystem Affected Versions Fixed Version
django-cms
PyPI
≥ 5.0.8
< 5.0.9
5.0.9

References

Frequently Asked Questions

What is CVE-2026-75526?
CVE-2026-75526 is a security vulnerability in django CMS involving Stored XSS in edit-mode plugin exception rendering under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which django CMS versions are affected?
Affected versions include releases prior to 5.0.9 across affected packages: django-cms.
What version fixes CVE-2026-75526?
Upgrading to 5.0.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is django-cms affected?
Yes, django-cms is affected in releases prior to 5.0.9. Upgrade your dependency to 5.0.9 or later.
What is the CVSS score of CVE-2026-75526?
CVE-2026-75526 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-75526?
CVE-2026-75526 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2026-75526?
Run the dependency tree command: 'pip show django-cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hvq6-2r72-p2x7",
  "modified" : "2026-08-20T18:42:36Z",
  "published" : "2026-08-20T18:42:36Z",
  "aliases" : [ "CVE-2026-75526" ],
  "summary" : "django CMS: Stored XSS in edit-mode plugin exception rendering",
  "details" : "## Summary\n\nWhen plugin rendering fails in edit mode, django CMS renders a `cms-rendering-exception` block so editors can see that a placeholder could not be rendered. Older code built that block's heading by interpolating the exception message, placeholder/source strings, and the failing plugin's short description directly into an HTML string, then returned the placeholder output as safe markup.\n\nIf an editor could store HTML in data used by a plugin's `get_short_description()` (or in other values interpolated into the exception message), and that plugin later raised during edit-mode rendering, the payload was parsed as HTML in the staff user's browser. This is a stored XSS condition in the CMS editing context.\n\n## Impact\n\nThe vulnerable path is only reached when placeholder rendering catches a plugin rendering exception:\n\n```python\ntry:\n    placeholder_content = \"\".join(plugin_content)\nexcept Exception as e:\n    context[\"exc_info\"] = sys.exc_info()\n    placeholder_content = self.render_exception(\"rendering placeholder\", context, placeholder, editable)\n```\n\n`render_exception()` constructs a `message` from values that can include stored content:\n\n- `value` - the exception message.\n- `placeholder` - the placeholder string representation.\n- `placeholder.source` - the source object string representation, such as page content.\n- `instance.get_short_description()` - plugin-provided summary text, often derived from plugin model fields.\n\nIn the vulnerable implementation, that message was embedded directly into an HTML heading. The final placeholder content was later returned through `mark_safe`, so Django template autoescaping did not protect the heading.\n\n`settings.DEBUG` does not mitigate the issue: it only controls whether Django's traceback HTML is appended. The custom heading is rendered in edit mode regardless of `DEBUG`.\n\n## Patch\n\nEscape the custom exception heading before returning it as safe placeholder markup. The current fixed code uses `format_html`, which escapes `message` before inserting it into the heading:\n\n```python\nheading = format_html('<h2 class=\"cms-rendering-exception-title\">{}</h2>', message)\n```\n\nThe traceback HTML from `ExceptionReporter.get_traceback_html()` should remain separate from django CMS's custom heading; Django's traceback escaping does not protect additional HTML assembled by django CMS.\n\n## Workarounds\n\nUntil patched, reduce exposure by ensuring only fully trusted staff can edit plugins whose stored fields are included in `get_short_description()`, and fix or disable plugins that can be made to raise during edit-mode rendering. This is only a partial mitigation because the escaping bug is in the shared exception-rendering path.\n\n## References\n\n- `cms/plugin_rendering.py` - `ContentRenderer.render_placeholder`\n- `cms/plugin_rendering.py` - `ContentRenderer.render_exception`\n- Fixed code: `heading = format_html('<h2 class=\"cms-rendering-exception-title\">{}</h2>', message)`\n- Regression tests:\n  `cms.tests.test_plugin_renderers.TestExceptionCatchers.test_exception_in_plugin_render_escapes_user_content_in_edit_mode`,\n  `cms.tests.test_plugin_renderers.TestLegacyRendererExceptionCatcher.test_exception_in_plugin_render_escapes_user_content_in_edit_mode`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "django-cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.8"
      }, {
        "fixed" : "5.0.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/django-cms/django-cms/security/advisories/GHSA-hvq6-2r72-p2x7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django-cms/django-cms/pull/8711"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django-cms/django-cms/commit/b56a568844ff3702495945f73a31d0868285bf88"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django-cms/django-cms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django-cms/django-cms/releases/tag/5.0.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:42:36Z",
    "nvd_published_at" : null
  }
}