LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 4.2Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

A specific Discourse configuration can let attacker-supplied text run as script in an error message. Business impact is limited but real: affected forums could expose user data or alter page content for users who trigger the message. The issue is conditional and patched, so priority is configuration review and upgrade verification.

Executive priority

Treat as a targeted maintenance issue, not an emergency, unless your Discourse instance matches the risky configuration. Confirm upgrade and CSP posture during the next security maintenance cycle.

Technical view

CVE-2021-41095 is a CWE-79 XSS in Discourse error-message rendering involving user input and blocked watched words. It affects Discourse stable 2.7.7 and earlier, and beta/tests-passed 2.8.0.beta6 and earlier. Exposure requires blocked watched words containing HTML tags and modified or disabled default CSP.

Likely exposure

Likely exposure is narrow: self-hosted or managed Discourse sites on the affected versions, with non-default CSP posture and blocked watched words containing HTML tags.

Exploitation context

The provided sources do not show CISA KEV listing or active exploitation. CVSS 4.2 reflects network reachability but high attack complexity and required user interaction.

Researcher notes

Focus validation on configuration preconditions before testing behavior. The vulnerability depends on error-message rendering of user-controlled input, watched-word blocking, and CSP changes. Avoid assuming all Discourse deployments are exposed.

Mitigation direction

  • Upgrade Discourse beyond the listed affected stable, beta, or tests-passed versions.
  • Check the GitHub advisory for branch-specific vendor guidance.
  • Keep Discourse default Content Security Policy enabled and unmodified where possible.
  • Remove blocked watched words that contain HTML tags.

Validation and detection

  • Inventory Discourse branch and version against the affected ranges.
  • Review blocked watched words for entries containing HTML tags.
  • Confirm the site has not disabled or weakened Discourse default CSP.
  • Verify the deployed release includes the referenced patch or later vendor updates.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-41095 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
4.2 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
4.2CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N1.62.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

4.2Medium
CVSS 3.1 vector shape for CVE-2021-41095Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
discoursediscourse<= 2.7.7, >= 2.8.0.beta1, <= 2.8.0.beta6Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-79 · source CWE mapping

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.