What’s Vulnerable › Vulnerabilities
CVE-2024-47772: Cross-site Scripting (XSS) via chat excerpts when content security policy (CSP) disabled in Discourse
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-10-07 · updated 2026-06-17
- Weakness: CWE-79
Description
Discourse is an open source platform for community discussion. An attacker can execute arbitrary JavaScript on users' browsers by sending a maliciously crafted chat message and replying to it. This issue only affects sites with CSP disabled. This problem is patched in the latest version of Discourse. All users are advised to upgrade. Users unable to upgrade should ensure CSP is enabled on the forum. Users who do upgrade should also consider enabling a CSP as well as a proactive measure.
Affected products
- discourse: before 3.3.2; before 3.4.0; 3.4.0-beta1 — fixed in 3.3.2, 3.4.0
How to fix
Upgrade to a fixed version: discourse 3.3.2, 3.4.0. Check the vendor advisory for mitigations.
References
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
- https://github.com/discourse/discourse/security/advisories/GHSA-67mh-xhmf-c56h
Get alerted when CVE-2024-47772 or the next vulnerability affects your stack