/

CVE-2026-33427

Severity:

HIGH RISK

(7.5)

Missing Authorization in Discourse Authorization Flow

CVE-2026-33427

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

User Impersonation and Phishing Facilitation

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

Discourse contains a missing authorization control that allows an unauthenticated attacker to force a legitimate Discourse authorization page to display an attacker-controlled domain.

When users are tricked into visiting crafted links, this behavior can be abused for social engineering attacks such as phishing or credential harvesting.

Affected context

This vulnerability affects Discourse instances that expose their authorization or sign-in flows to the public internet and rely on them to broker trust with external domains or identity providers.

The issue appears in the logic that builds or displays authorization-related pages, where user-controlled or unvalidated parameters can influence the domain shown to the end user.

It becomes risky in environments where users are conditioned to trust the Discourse brand and UI, and may not verify URLs carefully in authorization prompts.

Exploit preconditions

  • Attack surface: Public-facing Discourse authorization endpoints (e.g., login, authorization, or callback-related URLs).
  • Required access: No authentication is required; the attacker only needs the ability to send crafted links or cause victims to visit attacker-defined URLs.
  • Trigger point: A victim visiting a maliciously constructed URL that causes the authorization page to render with an attacker-controlled domain or return URL.
  • Why exploitation is possible: The authorization flow lacks sufficient validation or authorization checks on parameters that determine what domain is presented to users, allowing untrusted input to shape trusted UI elements.

Why this happens

The core issue maps to CWE-862: Missing Authorization, where the application fails to enforce authorization constraints on a sensitive operation—in this case, controlling key aspects of the authorization UI such as the domain or return target.

Instead of tightly constraining which domains can be shown or trusted, the implementation allows unauthenticated or unprivileged users to influence authorization context that should only be derived from vetted configuration or authenticated state.

This breaks the trust boundary between the Discourse instance and external domains, resulting in UI-level spoofing opportunities that support social engineering.

Potential impact

  • Users may be tricked into authorizing actions they believe are associated with a legitimate domain but are actually controlled by an attacker.
  • Attackers could facilitate phishing campaigns by combining a genuine Discourse authorization page with misleading domain information.
  • Users may inadvertently share credentials, tokens, or sensitive information with attacker-controlled services.
  • Erosion of trust in the platform's login and authorization prompts, potentially impacting overall account security.

General mitigation guidance

Effective mitigation focuses on tightening authorization logic and reducing the influence of untrusted data on authorization UI:

  • Treat any domain, redirect, or return-URL parameters as untrusted and enforce strict allowlists of permitted domains and paths.
  • Bind authorization page content to server-side configuration and authenticated session state instead of user-supplied input.
  • Introduce centralized authorization checks that validate whether the current caller is permitted to request or display a given domain or redirect target.
  • Normalize and canonicalize URLs before validation, and reject or neutralize parameters that do not match known-safe patterns.
  • Clearly separate user-controlled text from security-sensitive UI elements, using fixed templates for domains and identity provider names.

How teams detect issues like this

Organizations can detect similar issues by:

  • Using static analysis or linting rules to flag direct inclusion of request parameters in security-sensitive UI (e.g., domains, redirect URLs, issuer names) without validation.
  • Conducting focused code reviews around authentication and authorization flows, looking for places where redirect or domain parameters are accepted and displayed.
  • Implementing security tests that attempt open redirect and spoofed-domain scenarios against login and authorization endpoints, including fuzzing of redirect/return parameters.
  • Applying security policies that require centralized helpers for building redirect URLs and authorization prompts, and enforcing their use via automated review tools or pre-commit hooks.

Sources

SourceLink
github.comgithub.com/discourse/discourse/security/advisories/GHSA-9vhg-2mx3-mqfr

Frequently asked

questions

The issue is widely exploitable in the sense that no authentication is needed; any attacker who can share or embed a crafted link can attempt to trick users, but each attack still depends on convincing users to visit and trust the spoofed authorization page.

No direct server access is required. The attacker needs only network access to the public Discourse instance (as any normal user would have) and a channel to deliver crafted URLs to potential victims.

The most robust fix is to strictly control which domains and redirect targets can appear in authorization flows using server-side allowlists and authorization checks, eliminating any dependence on untrusted parameters for security-critical UI elements.

When designing authentication and authorization flows, treat all external and user-supplied URLs as untrusted, centralize URL validation and authorization logic, and regularly review these flows with a focus on domain/redirect handling and social-engineering resistance.

Find out what's already
exploitable in your codebase.