CVE-2021-39161: Discourse - Reflected XSS
- Cve: CVE-2021-39161
- Name: Discourse - Reflected XSS
- 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.
- Impact: Attackers can execute malicious scripts in users' browsers, potentially leading to session hijacking or data theft.
- Remediation: Ensure Content Security Policy is enabled and not modified; update to the latest stable, beta, or tests-passed versions of Discourse.
- Vulnerability type: reflected_xss
- Vulnerability impact: client_script_exec
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.4
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Epss score: 0.00413
- Epss percentile: 0.36338
- Assignee: [email protected]
- Published at: 2021-08-26T20:15:07Z
- Age in days: 1916
- Modified at: 2026-06-17T04:03:13Z
- Patch available: yes
- References total: 1
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-39161
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/discourse/discourse/security/advisories/GHSA-xhmc-9jwm-wqph | nvd | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| discourse:discourse | = 2.8.0 beta4, = 2.8.0 beta3, = 2.8.0 beta1, = 2.8.0 beta2, < 2.7.8 | no | nvd | /v1/products/discourse/discourse |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| discourse/discourse | security_advisory | yes | /v1/repositories/discourse/discourse |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Authentication required: yes
- Exposed hosts: 22639
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports