CVE-2025-48954 Discourse vulnerable to XSS via user-provided query parameter in oauth failure flow

High 8.1 Published Updated

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.

PackageAffectedFixed in
discourse BitnamiAll versions3.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.

All Discourse Discourse vulnerabilities

Sources

Also known as BIT-discourse-2025-48954, GHSA-26p5-mjjh-wfcf.

Is CVE-2025-48954 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free