What’s Vulnerable › Vulnerabilities
CVE-2023-25172: Discourse vulnerable to Cross-site Scripting - user name displayed on post
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-03-17 · updated 2026-06-17
- Weakness: CWE-79
Description
Discourse is an open-source discussion platform. Prior to version 3.0.1 of the `stable` branch and version 3.1.0.beta2 of the `beta` and `tests-passed` branches, a maliciously crafted URL can be included in a user's full name field to to carry out cross-site scripting attacks on sites with a disabled or overly permissive CSP (Content Security Policy). Discourse's default CSP prevents this vulnerability. The vulnerability is patched in version 3.0.1 of the `stable` branch and version 3.1.0.beta2 of the `beta` and `tests-passed` branches. As a workaround, enable and/or restore your site's CSP to the default one provided with Discourse.
Affected products
- discourse: before 3.0.1; before 3.1.0; 3.1.0-beta1 — fixed in 3.0.1, 3.1.0
How to fix
Upgrade to a fixed version: discourse 3.0.1, 3.1.0. Check the vendor advisory for mitigations.
References
- https://github.com/discourse/discourse/commit/1a5a6f66cb821ed29a737311d6fdc2eba5adc915
- https://github.com/discourse/discourse/commit/c186a46910431020e8efc425dec2133e7a99fa9a
- https://github.com/discourse/discourse/pull/20008
- https://github.com/discourse/discourse/pull/20009
- https://github.com/discourse/discourse/security/advisories/GHSA-7pm2-prxw-wrvp
- https://github.com/discourse/discourse/commit/1a5a6f66cb821ed29a737311d6fdc2eba5adc915
- https://github.com/discourse/discourse/commit/c186a46910431020e8efc425dec2133e7a99fa9a
- https://github.com/discourse/discourse/pull/20008
- https://github.com/discourse/discourse/pull/20009
- https://github.com/discourse/discourse/security/advisories/GHSA-7pm2-prxw-wrvp
Get alerted when CVE-2023-25172 or the next vulnerability affects your stack