/

CVE-2026-29072

Severity:

HIGH RISK

(7.5)

Missing Authorization in Discourse Policy Plugin

CVE-2026-29072

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Policy Widget Creation and Misleading Policy Acceptance

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A missing authorization check in the Discourse policy plugin allows users outside designated policy-creation groups to create functional policy acceptance widgets in posts under certain conditions.

When exploited, ordinary users can present other users with seemingly legitimate policy prompts, potentially misleading them into agreeing to unintended terms or capturing acceptance records that appear official.

Affected context

This vulnerability occurs in Discourse instances that have the discourse-policy plugin enabled and rely on policy widgets inside posts to collect user acknowledgements or consent.

It is relevant when site administrators restrict policy creation to specific groups but still permit regular users to create or edit posts in areas where policy widgets can be embedded.

Under those conditions, the backend fails to consistently enforce group-based authorization on policy widget creation or usage, allowing unauthorized users to produce functional policy acceptance components.

Exploit preconditions

  • Attack surface: Web application (forum posts handled by the Discourse policy plugin)
  • Required access: Authenticated user account with permission to create or edit posts in at least one category where the policy plugin is active
  • Trigger point: Crafting or editing a post such that a policy acceptance widget is instantiated or interpreted as a valid policy by the plugin
  • Why exploitation is possible: The code path responsible for validating whether a user belongs to an allowed policy-creation group does not consistently execute (or enforce restrictions) before a policy widget is accepted and rendered as functional

Why this happens

The core issue is a lack of complete, centralized authorization checks around the creation of policy acceptance widgets within posts.

While configuration may specify which groups are permitted to create policies, the plugin logic does not fully enforce these constraints on all relevant operations.

This aligns with CWE-862: Missing Authorization, where the system performs a privileged action—creating or registering a functional policy widget—without verifying that the requesting user has the necessary authorization.

As a result, users who should only be able to create normal content can instead create widgets that the system treats as official policies.

Potential impact

  • Users could create misleading policy prompts that appear to originate from administrators or trusted staff.
  • Attackers may trick other users into "accepting" fabricated terms, rules, or consents.
  • Records of policy acceptance could be polluted with entries tied to unauthorized or fake policies.
  • Moderation and compliance workflows may be undermined if policy acknowledgements cannot be reliably trusted.
  • Social engineering campaigns could be amplified by embedding deceptive policy widgets in high-visibility posts.

General mitigation guidance

Effective mitigation focuses on enforcing strict authorization and reducing implicit trust in user-generated policy constructs:

  • Centralize authorization checks so that any creation, update, or activation of policy widgets is gated by explicit group-based permission checks.
  • Treat policy definitions and consent flows as administrative or moderator-only operations, separated from general post content.
  • Restrict where policy widgets can appear, limiting them to clearly designated categories or post types controlled by staff.
  • Ensure that the rendering layer clearly distinguishes official, site-level policies from ordinary user content to reduce the risk of confusion.
  • Apply the principle of least privilege to plugin features: disable or narrow policy functionality where it is not operationally required.

How teams detect issues like this

Detection typically combines configuration review with ongoing monitoring:

  • Use code review and static analysis to locate controller actions, serializers, or plugin endpoints that manipulate policy entities without explicit authorization checks.
  • Search for policy-related routes or components that do not verify membership in the configured policy-creation groups before creating or activating widgets.
  • Review logs or database records for policies created by non-staff or non-privileged accounts, especially where site configuration should restrict this capability.
  • Incorporate automated tests or policy-as-code checks that assert only specific roles/groups can create or modify policy widgets.
  • Periodically audit visible policy prompts in the UI to confirm they correspond to intended, administrator-defined policies.

Sources

SourceLink
github.comgithub.com/discourse/discourse/security/advisories/GHSA-7ph8-vprq-4jrp

Frequently asked

questions

Yes. Any attacker who can register or obtain an ordinary user account on the affected Discourse instance and create or edit posts where the plugin is active could potentially exploit the issue remotely via the web interface.

The attacker needs authenticated access with normal posting privileges in at least one area where the policy plugin is enabled. Administrative or staff privileges are not required if the vulnerability is present.

The safest fix is to enforce strict, centralized authorization checks on all policy widget creation and modification paths, ensuring only users in explicitly allowed groups (such as admins or designated staff groups) can create functional policy prompts. Separating policy management from general post content and applying least privilege to all plugin operations further reduces risk.

Future prevention should include designing features so that all privileged operations pass through a single, well-reviewed authorization layer; writing tests that assert unauthorized roles cannot trigger policy-related actions; and periodically auditing plugins and extensions for missing or inconsistent enforcement of role and group permissions.

Find out what's already
exploitable in your codebase.