Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-72727

CVE-2026-72727: Discourse XSS Vulnerability

CVE-2026-72727 is a stored XSS vulnerability in Discourse that allows low-privileged users to inject malicious scripts in the moderation queue. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-72727 Overview

CVE-2026-72727 is a stored cross-site scripting (XSS) vulnerability in Discourse, an open-source discussion platform. A low-privileged user can place crafted content in the moderation review queue. When a moderator views that content on a site with a modified or disabled default Content Security Policy (CSP), the payload executes in the moderator's browser session. The issue is classified under CWE-79. Fixed releases are 2026.1.6, 2026.5.2, 2026.6.1, and 2026.7.0.

Critical Impact

Attackers with a standard forum account can execute script in a moderator's browser context, enabling session abuse or moderator-scoped actions when the default CSP is weakened.

Affected Products

  • Discourse versions prior to 2026.1.6
  • Discourse versions prior to 2026.5.2 and 2026.6.1
  • Discourse versions prior to 2026.7.0

Discovery Timeline

  • 2026-08-10 - CVE-2026-72727 published to NVD
  • 2026-08-13 - Last updated in NVD database

Technical Details for CVE-2026-72727

Vulnerability Analysis

The flaw is a stored XSS in the moderation review queue. Discourse routes flagged posts, queued topics, and other reportable items into a review workflow that moderators inspect. A low-privileged authenticated user can submit content containing script constructs that render in the moderator's browser when the queue entry is viewed.

Exploitation requires moderator interaction with the crafted entry. Successful execution runs in the moderator's session context, exposing privileged review actions and any data reachable from that origin.

Root Cause

The review queue rendering path did not sufficiently sanitize or encode user-supplied content before display. Discourse's default Content Security Policy blocks inline script execution and mitigates the flaw in shipped configurations. Operators who modify or disable the default CSP lose that compensating control, allowing the stored payload to execute.

Attack Vector

An attacker with a normal user account submits content designed to enter the review queue, such as a flagged post or a queued topic containing an XSS payload. A moderator later opens the review interface and triggers script execution in their authenticated session. Because the attack chain depends on moderator interaction, it is not remotely automatable without a target action.

See the GitHub Security Advisory GHSA-pq6q-p5g3-rj54 for maintainer-provided technical details.

Detection Methods for CVE-2026-72727

Indicators of Compromise

  • Review queue entries containing HTML tags, <script> fragments, event handlers such as onerror= or onload=, or javascript: URIs in user-submitted fields.
  • Moderator sessions issuing unexpected API calls to /review or account administration endpoints shortly after viewing queued content.
  • HTTP responses from /review routes containing unescaped angle brackets or attribute payloads in user-controlled fields.

Detection Strategies

  • Inspect Discourse application logs for review queue submissions from low-reputation accounts that include HTML or script syntax.
  • Verify the deployed Content Security Policy header on Discourse responses and alert when script-src deviates from the shipped default.
  • Correlate moderator account activity with the timestamp of review queue views to surface anomalous privileged actions.

Monitoring Recommendations

  • Enable web server access logging for /review and related admin routes and forward to a centralized log platform.
  • Track CSP violation reports by configuring a report-uri or report-to endpoint and alerting on violations originating from review pages.
  • Baseline moderator action volume and alert on deviations following queue interactions.

How to Mitigate CVE-2026-72727

Immediate Actions Required

  • Upgrade Discourse to 2026.1.6, 2026.5.2, 2026.6.1, or 2026.7.0 depending on the deployed release branch.
  • Restore the default Content Security Policy if it has been modified or disabled, and confirm CSP headers are served on all responses.
  • Audit recent review queue submissions and moderator activity for signs of exploitation prior to patching.

Patch Information

Discourse maintainers released fixes in versions 2026.1.6, 2026.5.2, 2026.6.1, and 2026.7.0. Operators should apply the patch corresponding to their release channel. Reference the GitHub Security Advisory for full remediation guidance.

Workarounds

  • Re-enable Discourse's default Content Security Policy through the admin site settings to block inline script execution.
  • Restrict who can submit content that enters the moderation review queue by tightening new-user trust levels and posting permissions.
  • Limit moderator access to the review queue until upgrades are completed on affected instances.
bash
# Verify the Content Security Policy header is present on a Discourse instance
curl -sI https://discourse.example.com/ | grep -i content-security-policy

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.