HIGH 7.3

CVE-2026-53963: Stored XSS in Discourse Second Factor Names Leading to Admin Account Compromise

A flaw in Discourse allows an attacker with an account on the platform to inject malicious code into a second factor (like a 2FA security key) display name. When a site administrator impersonates that attacker's account for troubleshooting or support purposes, the unescaped name executes in the admin's browser, potentially letting the attacker steal the admin's session, modify forum content, or perform other harmful actions. The issue stems from insufficient sanitization in the account deletion confirmation dialog.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.3 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
Weaknesses (CWE)
CWE-79
Affected products
2 configuration(s)
Published / Modified
2026-07-09 / 2026-07-14

NVD description (verbatim)

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.

9 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

Discourse versions prior to 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5 contain a stored cross-site scripting (XSS) vulnerability in the second factor deletion workflow. The vulnerability arises because the second factor name is not properly HTML-escaped when rendered in the confirmation dialog. An authenticated attacker can craft a malicious second factor name containing JavaScript payload. If an administrator later impersonates the attacker's account (a common administrative function in Discourse), the unescaped payload executes in the admin's security context. The attack requires both account creation and administrator account impersonation, limiting the attack surface but creating meaningful risk in multi-tenant or community-managed forum environments.

Business impact

For Discourse operators, this vulnerability presents a pathway for privilege escalation. Attackers with regular user accounts can compromise administrator accounts if those admins perform account impersonation activities. This could result in unauthorized content modification, user data exposure, forum defacement, or lateral movement to connected systems if the compromised admin account has additional privileges. Community forums and internal discussion platforms that rely on Discourse for trusted communication face reputational and operational risk if administrative integrity is compromised.

Affected systems

The vulnerability affects Discourse installations running versions prior to the patched releases: 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5. Organizations using any earlier version in these release branches should prioritize patching. Self-hosted Discourse instances are most likely to be affected, as managed SaaS deployments typically receive automatic updates.

Exploitability

Exploitation requires an attacker to possess a valid user account on the target Discourse instance and the ability to configure a second factor (such as a TOTP or security key). The secondary requirement—that an administrator must impersonate the account—depends on organizational practices. In forums with active administrative troubleshooting or support workflows, the likelihood of account impersonation increases. Public Discourse instances with lenient registration policies present higher risk than tightly controlled internal deployments. No publicly released exploit code or active exploitation in the wild is currently documented.

Remediation

Upgrade to the patched versions: 2026.6.0 (latest stable), 2026.5.1 (prior stable branch), 2026.4.2 (extended support), or 2026.1.5 (legacy support). Organizations should apply updates during scheduled maintenance windows, as Discourse updates typically do not require downtime beyond a brief restart. Prior to patching, administrators should limit the use of account impersonation features if possible and monitor for unusual second factor configurations that contain special characters or script-like syntax.

Patch guidance

Discourse maintainers have released patches across four version streams to address this issue. Administrators should consult the Discourse release notes and security advisories to confirm the exact version available for their deployment. Self-hosted instances can upgrade directly; managed deployments should confirm patch status with their provider. Verify against the official Discourse security advisory to confirm your current version is listed as vulnerable and the target version as patched before applying updates.

Detection guidance

Monitor Discourse audit logs for administrator account impersonation events, particularly those followed by modifications to second factor settings or account deletion operations. Review second factor names in your installation for suspicious patterns such as HTML tags, angle brackets, or encoded script references. If Discourse logging is enabled, search historical logs for second factor creation or modification events with names containing 'script', 'onerror', 'onclick', or other XSS markers. After patching, verify that second factor names are rendered as plain text in all administrative dialogs.

Why prioritize this

This vulnerability scores 7.3 (HIGH) because it combines stored XSS with privilege escalation potential through administrative account impersonation. While it requires an existing user account to initiate, the consequence—compromise of an administrative account—justifies immediate attention in environments where administrators routinely impersonate user accounts for support. The vulnerability is not in CISA's KEV catalog, suggesting limited active exploitation, but the simplicity of exploitation and high-value target (admin accounts) warrant rapid patching.

Risk score, explained

The CVSS 3.1 score of 7.3 reflects: (1) Network-accessible attack vector—any user with forum access can trigger the initial payload injection; (2) Low attack complexity—no special conditions or bypasses required; (3) Low privilege requirement—a standard user account suffices; (4) User interaction—administrator must impersonate the account; (5) High confidentiality and integrity impact—a compromised admin account can access sensitive data and modify forum content; (6) No availability impact. The score appropriately captures the privilege-escalation and data-exposure risk while acknowledging the user-interaction requirement.

Frequently asked questions

Does this vulnerability allow unauthenticated attacks?

No. The attacker must have a valid user account on the Discourse instance to configure a malicious second factor name. However, account registration is often open on public Discourse forums, making this a minor barrier in many deployments.

What happens if we remove administrator account impersonation as a feature?

Disabling account impersonation would eliminate the attack path, but this feature is often essential for troubleshooting, support workflows, and user account recovery. Patching is the recommended approach. If impersonation must remain enabled, restrict it to a small number of highly trusted administrators and audit all impersonation events.

Can we detect if this vulnerability has been exploited in our forum?

Check Discourse audit logs for second factor creation/modification events with unusual characters or script-like syntax in the name field, combined with administrator impersonation events shortly afterward. Review browser console errors or JavaScript warnings in admin session logs. After patching, test the admin panel to ensure second factor names display as plain text.

Does this affect Discourse Cloud (SaaS) customers?

Discourse Cloud customers are managed by Discourse Inc. and typically receive automatic updates. Verify your current version and patch status by contacting Discourse support or reviewing your instance admin panel. Self-hosted customers are responsible for applying patches manually.

This analysis is provided for informational purposes to support vulnerability assessment and patch planning. SEC.co does not provide legal or compliance advice. Verify all patch versions, affected systems, and remediation steps against the official Discourse security advisory and your specific deployment configuration. Testing patches in a staging environment before production deployment is strongly recommended. Organizations should consult their security and compliance teams regarding disclosure and response timelines appropriate for their risk profile and regulatory obligations. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).