Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41095

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41095
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:55 UTC · Revision 1

Source evidence

CVE-2021-41095

core-osv · Original source

Published 27 Sept 2021, 20:15 UTC

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.

osv:CVE-2021-41095
Complete source record
{
  "id": "0bb5d3ebab18a674a250293c42d78da664628d23c14a7ec8832c6497dee02c52",
  "url": "https://osv.dev/vulnerability/CVE-2021-41095",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41095",
    "summary": "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.",
    "evidence": "osv:CVE-2021-41095",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-41095",
      "aliases": [
        "BIT-discourse-2021-41095",
        "CVE-2021-41095",
        "GHSA-qvqx-2h7w-m479"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/discourse/discourse",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "b47c5f69d859866c1b42cd316f11dae4270b118f"
                },
                {
                  "introduced": "05c1d3c9cdd7f3e365bedc397dd92a7e7bc2c40f"
                },
                {
                  "last_affected": "f0d2b0f2f08fc201031c85e1669dbd82dcd9b543"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "2.7.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:2.8.0:beta1:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0-beta1"
                      },
                      {
                        "last_affected": "2.8.0-beta1"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:2.8.0:beta2:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0-beta2"
                      },
                      {
                        "last_affected": "2.8.0-beta2"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:2.8.0:beta3:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0-beta3"
                      },
                      {
                        "last_affected": "2.8.0-beta3"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:2.8.0:beta4:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0-beta4"
                      },
                      {
                        "last_affected": "2.8.0-beta4"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:2.8.0:beta5:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0-beta5"
                      },
                      {
                        "last_affected": "2.8.0-beta5"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "cpe": "cpe:2.3:a:discourse:discourse:2.8.0:beta6:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.8.0-beta6"
                      },
                      {
                        "last_affected": "2.8.0-beta6"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.8.0-beta1",
            "2.8.0-beta2",
            "2.8.0-beta3",
            "2.8.0-beta4",
            "2.8.0-beta5",
            "2.8.0-beta6",
            "v2.8.0.beta6",
            "v2.8.0.beta5",
            "v2.7.7",
            "v2.7.6",
            "v2.8.0.beta4",
            "v2.8.0.beta3",
            "v2.7.5",
            "v2.7.4",
            "v2.7.3",
            "v2.8.0.beta2",
            "v2.7.2",
            "v2.7.1",
            "v2.7.0",
            "v2.8.0.beta1",
            "v2.6.7",
            "v2.6.6",
            "v2.6.5",
            "v2.6.4",
            "v2.6.3",
            "v2.6.2",
            "v2.6.1",
            "v2.6.0",
            "v2.5.5",
            "v2.5.4",
            "v2.5.3",
            "v2.5.2",
            "v2.5.1",
            "v2.5.0",
            "v2.4.5",
            "v2.4.4",
            "v2.4.3",
            "v2.4.2",
            "v2.4.1",
            "v2.4.0",
            "v2.3.10",
            "v2.3.9",
            "v2.3.8",
            "v2.3.7",
            "v2.3.6",
            "v2.3.5",
            "v2.3.4",
            "v2.3.3",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.2.6",
            "v2.2.5",
            "v2.2.4",
            "v2.2.3",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.8",
            "v2.1.7",
            "v2.1.6",
            "v2.1.5",
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.9.7",
            "v1.9.6",
            "v1.9.5",
            "v1.9.4",
            "v1.9.3",
            "v1.9.2",
            "v1.9.1",
            "v1.9.0",
            "v1.8.11",
            "v1.8.10",
            "v1.8.9",
            "v1.8.8",
            "v1.8.7",
            "v1.8.6",
            "v1.8.5",
            "v1.8.4",
            "v1.8.3",
            "v1.8.2",
            "v1.8.1",
            "v1.8.0",
            "v1.7.10",
            "v1.7.9",
            "v1.7.8",
            "v1.7.7",
            "v1.7.6",
            "v1.7.5",
            "v1.7.4",
            "v1.7.3",
            "v1.7.2",
            "v1.7.1",
            "v1.7.0",
            "v1.6.10",
            "v1.6.9",
            "v1.6.8",
            "v1.6.7",
            "v1.6.6",
            "v1.6.5",
            "v1.6.4",
            "v1.6.3",
            "v1.6.2",
            "v1.6.1",
            "v1.6.0",
            "v1.5.4",
            "v1.5.3",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.7",
            "v1.4.6",
            "v1.4.5",
            "v1.4.4",
            "v1.4.3",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.5",
            "v1.3.4",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.4",
            "v1.2.3",
            "v1.2.2",
            "v1.2.1",
            "v1.2.0",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.4",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v0.9.9.18",
            "v0.9.9.17",
            "v0.9.9.16",
            "v0.9.9.15",
            "v0.9.9.14",
            "v0.9.9.13",
            "v0.9.9.12",
            "v0.9.9.11",
            "v0.9.9.10",
            "v0.9.9.9",
            "v0.9.9.8",
            "v0.9.9.7",
            "v0.9.9.6",
            "v0.9.9.5",
            "v0.9.9.4",
            "v0.9.9.3",
            "v0.9.9.2",
            "v0.9.9.1",
            "v0.9.8.11",
            "v0.9.8.10",
            "v0.9.8.9",
            "v0.9.8.8",
            "v0.9.8.7",
            "v0.9.8.6",
            "v0.9.8.5",
            "v0.9.8.4",
            "v0.9.8.3",
            "v0.9.8.2",
            "v0.9.8.1",
            "v0.9.8",
            "v0.9.7.9",
            "v0.9.7.8",
            "v0.9.7.7",
            "v0.9.7.6",
            "v0.9.7.5",
            "v0.9.7.4",
            "v0.9.7.3",
            "v0.9.7.2",
            "v0.9.7.1",
            "v0.9.7",
            "v0.9.6.4",
            "v0.9.6.3",
            "v0.9.6.1",
            "v0.9.6",
            "v0.9.5.2",
            "v0.9.5.1",
            "v0.9.5",
            "v0.9.4",
            "v0.9.3",
            "v0.9.2.6",
            "v0.9.2.5",
            "v0.9.2",
            "v0.9.1",
            "v0.9.0",
            "v0.8.9",
            "v0.8.8",
            "v0.8.7",
            "v0.8.6",
            "v0.8.5",
            "v0.8.4",
            "v0.8.3",
            "v0.8.2",
            "v0.8.1",
            "v0.8.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41095.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:57.093138963Z",
      "provider": "osv",
      "references": [
        "https://github.com/discourse/discourse/security/advisories/GHSA-qvqx-2h7w-m479",
        "https://github.com/discourse/discourse/pull/14434/commits/40b776b9d39c41d9273d01eecf8fe03aa39fcb59"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41095",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 386524,
  "published_at": "2021-09-27T20:15:07.267+00:00"
}