Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
PR:L because any registered user can upload SVGs; UI:R because victim must navigate to specific non-standard URLs; S:C for cross-origin JavaScript execution in victim's browser context.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
Discourse is an open-source discussion platform. Prior to 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5, insufficient SVG sanitization in upload and user avatar handling could lead to cross-site scripting when a user visited specific URLs that are not normally part of community browsing. This issue is fixed in versions 2026.6.0, 2026.5.1, 2026.4.2, and 2026.1.5.
AnalysisAI
Stored cross-site scripting in Discourse's SVG upload and user avatar handling allows authenticated users to inject malicious JavaScript that executes in victims' browsers when they visit specific non-standard URLs. The CVSS scope change (S:C) reflects that successful exploitation crosses the browser security boundary, enabling session token theft or account takeover against victims who visit the triggering URL. Vendor-confirmed patches are available across four release branches; no public exploit code or CISA KEV listing has been identified at time of analysis.
Technical ContextAI
Discourse is a Ruby on Rails-based open-source forum platform widely self-hosted by communities and organizations. The flaw (CWE-79: Improper Neutralization of Input During Web Page Generation) stems from insufficient sanitization of SVG files submitted through upload and avatar handling workflows. SVG is an XML-based vector format that legally supports embedded JavaScript via inline <script> elements, event handler attributes (onload, onerror, onclick), and javascript: URIs - making it a well-known XSS vector when not properly sanitized before browser rendering. The CVSS vector S:C (scope change) indicates the injected script executes outside the origin of the vulnerable component, consistent with same-origin policy bypass patterns common in avatar/upload serving contexts. Four upstream commits (3ee8343, 810c271, 92a699d, b8ceb49) address the sanitization logic across affected branches.
RemediationAI
The primary fix is to upgrade Discourse to one of the vendor-patched releases: v2026.6.0, v2026.5.1, v2026.4.2, or v2026.1.5, all available via the GitHub releases page (https://github.com/discourse/discourse/releases). The underlying fixes are delivered across four commits (3ee8343, 810c271, 92a699d, b8ceb49) and are confirmed by the vendor advisory GHSA-jmcf-3367-78vv. As a compensating control pending upgrade, administrators can remove 'svg' from the allowed upload extensions in Admin Settings under Files → authorized_extensions - this eliminates the SVG attack surface entirely at the cost of disabling SVG avatar and attachment support for all users. No other specific workarounds are documented in the available references.
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
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
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
Discourse is an open source platform for community discussion. Rated critical severity (CVSS 9.8), this vulnerability is
Unauthorized access to hidden post revisions in Discourse through version enumeration allows unauthenticated users to by
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-42734