Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister or control a forum account
-
DeliverySet 2FA name to XSS payload
-
ExploitAdmin impersonates the account
-
ExecutionAdmin opens 2FA delete dialog
-
PersistPayload executes in admin browser
-
ImpactHijack admin session/privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to hold a controllable Discourse account on which they set a malicious, HTML-bearing second-factor (2FA) method name, and - critically - requires an administrator to (1) use the impersonation feature on that specific account and (2) open the two-factor authenticator delete confirmation dialog, where the unescaped name is rendered. What limits exploitation: the payload only fires within an administrator's session (not against ordinary users), it depends on the discrete admin action of impersonation plus opening the 2FA delete dialog (CVSS UI:R), the attacker must first have a registered account (CVSS PR:L, not unauthenticated), and only unpatched builds below 2026.6.0/2026.5.1/2026.4.2/2026.1.5 are affected. It is not exploitable against default browsing by end users and is not automatable. |
| Impact | The supplied CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H = 9.0) drives the critical rating largely through the scope change (S:C) and high triple impact, reflecting that code executes in a high-authority admin session. However, the signals conflict on real-world urgency: EPSS is only 0.39% (31st percentile), the CVE is NOT in CISA KEV, and there is no public exploit identified, indicating no evidence of active or widespread exploitation. The practical attack path is also narrow - it requires an attacker account (PR:L), plus a specific and non-automatic administrator action (UI:R: impersonate the malicious account AND open the 2FA delete dialog). No SSVC decision record was provided. Net assessment: the raw 9.0 overstates day-to-day exploitation likelihood because of the heavy user-interaction and privilege prerequisites; this is a genuine admin-takeover primitive worth patching promptly on any impersonation-enabled forum, but it is not a mass-exploitable internet-facing bug. Note the C:H/I:H/A:H may be slightly generous for a browser-context XSS, though admin-session compromise plausibly cascades to full instance control. |
| Exploit ScenarioDerived | An attacker registers or controls an ordinary forum account and adds a TOTP/security-key second factor whose name is an HTML payload such as '<img src=x onerror="window.__xssTriggered=true">'. Later, an administrator investigating that user impersonates the account and opens the second-factor delete confirmation dialog, at which point the payload executes in the admin's authenticated browser session, enabling actions such as CSRF-token theft or admin-privileged API calls. No public exploit is identified, but the fix's regression test discloses a functional payload, and the network attack vector with low complexity means weaponization would be straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv3 – Jul 14, 2026
Stored cross-site scripting in the Discourse discussion platform allows a low-privileged registered user to set a malicious two-factor authenticator name that executes JavaScript in an administrator's browser when that admin impersonates the account and opens the 2FA delete confirmation dialog. Affected builds are Discourse before 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5, spanning the 2026.1.x through 2026.6.x release lines. There is no public exploit identified at time of analysis and the EPSS probability is low (0.39%), but the fix commit's regression test reveals the exact working payload, and successful exploitation runs in a full-admin context.
Earlier versions of this analysis (2)
Stored cross-site scripting in Discourse (versions prior to 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5) allows an attacker who controls a low-privilege account to inject JavaScript via a crafted two-factor authenticator name, which executes in an administrator's browser session when that admin impersonates the account and opens the second-factor delete/disable confirmation dialog. Because the payload runs in a privileged admin context and crosses a trust boundary (CVSS scope change), successful exploitation can lead to admin session compromise and site takeover. No public exploit identified at time of analysis, though the vendor fix commit ships a test carrying a working payload; EPSS is low (0.39%), indicating limited near-term mass-exploitation likelihood.
Stored cross-site scripting in Discourse (before 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5) lets a low-privileged attacker inject script via an unescaped second-factor (2FA) name on their own account, which executes in an administrator's browser when that admin impersonates the account and views the delete-confirmation dialog. Rated CVSS 7.3 (CWE-79), it enables session/account takeover of a privileged admin. No public exploit is identified at time of analysis and it is not listed in CISA KEV.
RemediationAI
Vendor-released patch: upgrade to 2026.6.0, 2026.5.1, 2026.4.2, or 2026.1.5, whichever matches your release branch (release notes at https://github.com/discourse/discourse/releases/tag/v2026.6.0, /v2026.5.1, /v2026.4.2, and /v2026.1.5; fix commit 40de62cddadc65c328a1028ab999f3fa94adbfed). The patch simply HTML-escapes the second-factor name in the delete dialog and has no functional side effects, so it should be applied without hesitation. If an immediate upgrade is not possible, the concrete compensating control is to avoid using the administrator impersonation feature (Admin > Users > Impersonate) - since exploitation requires an admin to impersonate the attacker's account and open the 2FA delete confirmation, refraining from impersonating untrusted or suspicious accounts fully breaks the attack chain; the trade-off is loss of impersonation-based support workflows. Reviewing accounts for 2FA method names containing HTML/script markup can also surface planted payloads before they are triggered.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is Discourse, a Ruby/Ember open-source community forum platform (CPE cpe:2.3:a:discourse:discourse). The root cause is CWE-79 (improper neutralization of input during web page generation): the Ember frontend controller preferences/second-factor.js interpolated the user-supplied second-factor method name directly into the delete confirmation dialog without HTML escaping. The upstream fix (commit 40de62cd and related 529e17d4, d92973e5, daea5214) wraps the value with escapeExpression(secondFactorMethod.name) from discourse/lib/utilities, converting the name to inert text. Because the 2FA name is attacker-controlled and persisted server-side, this is a stored (persistent) XSS rather than reflected, and it fires in the DOM of whichever session renders the dialog - here, an impersonating administrator.
Know when Discourse gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Attacker needs only a normal account (PR:L) but relies on an admin impersonation action (UI:R); XSS crosses into the admin's higher-authority session (S:C) with full impact on that context.
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionNVD
Discourse is an open-source discussion platform. Prior to 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5, a malicious second factor name on an attacker-controlled account was not escaped in the delete confirmation dialog, allowing stored cross-site scripting when an administrator impersonated that account. This issue is fixed in versions 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5.
Executive ViewAI
Discourse discussion platforms are vulnerable to an attack through the 2FA configuration process that allows unauthorized users to compromise administrator accounts and gain complete platform control. While no public exploit has been identified at time of analysis, successful exploitation would provide full access to all platform communications, discussions, and user data. Organizations running Discourse must apply the vendor patch within 7 days to eliminate this critical organizational risk.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Discourse versions prior to 3.5.0.beta6 contain a reflected cross-site scripting (XSS) vulnerability in social login fun
discourse-bbcode is the official BBCode plugin for Discourse. Rated critical severity (CVSS 9.8), this vulnerability is
Unauthorized information disclosure in Discourse discussion platform versions prior to 2026.3.0-latest.1, 2026.2.1, and
Discourse is an open source platform for community discussion. Rated high severity (CVSS 8.2), this vulnerability is rem
Discourse versions prior to 2025.12.2, 2026.1.1, and 2026.2.0 contain an insecure direct object reference (IDOR) in the
In Discourse 2.7.0 through beta1, a rate-limit bypass leads to a bypass of the 2FA requirement for certain forms. Rated
Unauthenticated attackers can submit forged webhook payloads to multiple email provider integrations in Discourse versio
Discourse is an open-source discussion platform. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploi
Discourse is an open source platform for community discussion. Rated medium severity (CVSS 5.9), this vulnerability is r
Discourse versions prior to 3.4.4 (stable), 3.5.0.beta5 (beta), and 3.5.0.beta6-dev (tests-passed) contain a critical vu
Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.8), this vulnerability is
Discourse Patreon enables syncronization between Discourse Groups and Patreon rewards. Rated critical severity (CVSS 9.8
EUVD-2026-42738
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB