What’s Vulnerable › Vulnerabilities
CVE-2021-41095: XSS via blocked watched word in error message
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-09-27 · updated 2026-06-17
- Weakness: CWE-79
Description
Discourse is an open source discussion platform. There is a cross-site scripting (XSS) vulnerability in versions 2.7.7 and earlier of the `stable` branch, versions 2.8.0.beta6 and earlier of the `beta` branch, and versions 2.8.0.beta6 and earlier of the `tests-passed` branch. Rendering of some error messages that contain user input can be susceptible to XSS attacks. This vulnerability only affects sites which have blocked watched words that contain HTML tags, modified or disabled Discourse's default Content Security Policy. This issue is patched in the latest `stable`, `beta` and `tests-passed` versions of Discourse. As a workaround, avoid modifying or disabling Discourse’s default Content Security Policy, and blocking watched words containing HTML tags.
Affected products
- discourse: through 2.7.7; 2.8.0-beta1, 2.8.0-beta2, 2.8.0-beta3, 2.8.0-beta4, 2.8.0-beta5, 2.8.0-beta6
References
- https://github.com/discourse/discourse/pull/14434/commits/40b776b9d39c41d9273d01eecf8fe03aa39fcb59
- https://github.com/discourse/discourse/security/advisories/GHSA-qvqx-2h7w-m479
- https://github.com/discourse/discourse/pull/14434/commits/40b776b9d39c41d9273d01eecf8fe03aa39fcb59
- https://github.com/discourse/discourse/security/advisories/GHSA-qvqx-2h7w-m479
Get alerted when CVE-2021-41095 or the next vulnerability affects your stack