CVE-2025-48954 Discourse vulnerable to XSS via user-provided query parameter in oauth failure flow
Attackers can execute arbitrary scripts via OAuth failure parameters if Content Security Policy is disabled, potentially compromising user accounts.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-48954?
CVE-2025-48954 is a high-severity cross-site scripting vulnerability in Discourse Discourse, published on 25 Jun 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Discourse is an open-source discussion platform. Versions prior to 3.5.0.beta6 are vulnerable to cross-site scripting when the content security policy isn't enabled when using social logins. Version 3.5.0.beta6 patches the issue. As a workaround, have the content security policy enabled.
Weakness: CWE-79
Which versions are affected by CVE-2025-48954?
1 open source package ship an affected version, including discourse. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
discourse Bitnami | All versions | 3.5.0 |
Products include Discourse Discourse.
How do I fix CVE-2025-48954?
Upgrade discourse to 3.5.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2025-48954 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-48954 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in Discourse Discourse
- CVE-2021-41163 RCE via malicious SNS subscription payload
- CVE-2022-36066 Discourse vulnerable to RCE via admins uploading maliciously zipped file
- CVE-2022-39356 Discourse user account takeover via email and invite link
- CVE-2023-22468 Discourse vulnerable to Cross-site Scripting in local oneboxes
- CVE-2026-27934 Discourse leaks private topic title and post excerpt via user action API endpoint
Sources
Also known as BIT-discourse-2025-48954, GHSA-26p5-mjjh-wfcf.