CVE-2021-41095: XSS via blocked watched word in error message

Published Sep 27, 2021
·
Updated

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.

Other sources

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 Software

7 affected components
Discourse Discourse<=2.7.7
Discourse Discourse=2.8.0-beta1
Discourse Discourse=2.8.0-beta2
Discourse Discourse=2.8.0-beta3
Discourse Discourse=2.8.0-beta4
Discourse Discourse=2.8.0-beta5
Discourse Discourse=2.8.0-beta6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Discourse to a version that resolves this vulnerability.

    Fixed in 2.7.7
  2. Upgrade

    Upgrade Discourse to a version that resolves this vulnerability.

    Fixed in 2.8.0.beta6
  3. Compensating control

    Mitigation/workaround: avoid modifying or disabling Discourse’s default Content Security Policy, and do not block watched words containing HTML tags.

Event History

Sep 27, 2021
CVE Published
via MITRE·07:30 PM
Data Sourced
via MITRE·07:30 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-41095?

CVE-2021-41095 is categorized as a cross-site scripting (XSS) vulnerability with a medium severity impact.

2

How do I fix CVE-2021-41095?

To fix CVE-2021-41095, upgrade Discourse to version 2.8.0 or later, ensuring you are not using a vulnerable version.

3

Which versions of Discourse are affected by CVE-2021-41095?

CVE-2021-41095 affects Discourse versions 2.7.7 and earlier of the stable branch, and versions 2.8.0.beta6 and earlier of the beta and tests-passed branches.

4

Can CVE-2021-41095 be exploited remotely?

Yes, CVE-2021-41095 can be exploited remotely, allowing attackers to execute scripts in the context of the user's session.

5

What are the consequences of not addressing CVE-2021-41095?

Failing to address CVE-2021-41095 may lead to user data exposure, session hijacking, and potential loss of user trust.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203