CVE-2026-75526: django CMS: Stored XSS in edit-mode plugin exception rendering

Published Aug 20, 2026
·
Updated

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 getshortdescription() (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: placeholdercontent = "".join(plugincontent) except Exception as e: context["excinfo"] = sys.excinfo() placeholdercontent = self.renderexception("rendering placeholder", context, placeholder, editable)

renderexception() 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.getshortdescription() - 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 marksafe, 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 formathtml, which escapes message before inserting it into the heading:

python heading = formathtml('<h2 class="cms-rendering-exception-title">{}</h2>', message)

The traceback HTML from ExceptionReporter.gettracebackhtml() 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 getshortdescription(), 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/pluginrendering.py - ContentRenderer.renderplaceholder - cms/pluginrendering.py - ContentRenderer.renderexception - Fixed code: heading = formathtml('<h2 class="cms-rendering-exception-title">{}</h2>', message) - Regression tests: cms.tests.testpluginrenderers.TestExceptionCatchers.testexceptioninpluginrenderescapesusercontentineditmode, cms.tests.testpluginrenderers.TestLegacyRendererExceptionCatcher.testexceptioninpluginrenderescapesusercontentineditmode

Other sources

django CMS is an easy-to-use and developer-friendly enterprise content management system powered by Django. From 5.0.8 until 5.0.9, ContentRenderer.renderplaceholder in cms/pluginrendering.py can pass stored, attacker-controlled values to ContentRenderer.renderexception when plugin rendering fails in edit mode. Values from getshortdescription(), the exception message, the placeholder, or placeholder.source are interpolated into a cms-rendering-exception heading and later returned through marksafe. Because the heading is not escaped, stored HTML executes in an editor’s browser, and settings.DEBUG does not prevent the custom heading from rendering. The fix uses formathtml to escape the message before safe placeholder output is returned. This issue is fixed in versions 5.0.9.

MITRE

Affected Software

2 affected componentsFixes available
django CMS django CMS>5.0.8<5.0.9
pip/django-cms>=5.0.8<5.0.9
5.0.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/django-cms to a version that resolves this vulnerability.

    Fixed in 5.0.9
  2. Upgrade

    Upgrade django CMS to a version that resolves this vulnerability.

    Fixed in 5.0.9
  3. Compensating control

    Until patched, restrict edit access to only fully trusted staff for plugins whose stored fields are included in get_short_description(), and ensure/fix/disable any such plugins that could be made to raise during edit-mode rendering.

Event History

Aug 20, 2026
CVE Published
via MITRE·06:11 PM
Data Sourced
via MITRE·06:11 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:42 PM
Data Sourced
via GitHub·06:42 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to the injected script?

The stored HTML executes in an editor’s browser when a plugin rendering failure is displayed in edit mode. The issue affects django CMS versions from 5.0.8 up to, but not including, 5.0.9.

2

What conditions are required for exploitation?

An attacker needs to be able to store attacker-controlled content in values used by a failing plugin, such as its short description, exception message, placeholder, or placeholder source. A plugin rendering failure must then occur while an editor views the affected placeholder in edit mode.

3

Does disabling Django DEBUG mode prevent exploitation?

No. The custom exception heading still renders in this path even when settings.DEBUG is disabled.

4

What should be done if an affected installation is identified?

Upgrade django CMS to version 5.0.9, which escapes the exception message before returning safe placeholder output. Until upgrading, limit untrusted users' ability to supply plugin-related stored values and investigate plugin rendering failures shown in edit mode.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203