CVE-2021-39161
published medium CVSS 3.1 · 4.4Cross-site scripting via category name in Discourse
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| discourse | — | discourse< 2.7.8 · >= 2.8.0.beta1, < 2.8.0.beta4 | Affected | Not stated | GitHub_M |
Description
Discourse is an open source platform for community discussion. In affected versions category names can be used for Cross-site scripting(XSS) attacks. This is mitigated by Discourse's default Content Security Policy and this vulnerability only affects sites which have modified or disabled or changed Discourse's default Content Security Policy have allowed for moderators to modify categories. This issue is patched in the latest stable, beta and tests-passed versions of Discourse. Users are advised to ensure that the Content Security Policy is enabled, and has not been modified in a way which would make it more vulnerable to XSS attacks.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.4 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| discourse | discourse | < 2.7.8 (affected)>= 2.8.0.beta1, < 2.8.0.beta4 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
1Provider assertions
2GitHub_M · cna
Cross-site scripting via category name in Discourse
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 6dafb7965b828a577f7fda68a7c1e31cba0542eaad86e36315520467643f9405
- Ingested
- 23 Sep 2026, 07:55:36 UTC
- Source record
- Official CVE record