What’s Vulnerable › Vulnerabilities
CVE-2024-23834: Discourse improperly sanitized user input leads to XSS
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-01-30 · updated 2026-06-17
- Weakness: CWE-79
Description
Discourse is an open-source discussion platform. Improperly sanitized user input could lead to an XSS vulnerability in some situations. This vulnerability only affects Discourse instances which have disabled the default Content Security Policy. The vulnerability is patched in 3.1.5 and 3.2.0.beta5. As a workaround, ensure Content Security Policy is enabled and does not include `unsafe-inline`.
Affected products
- discourse: before 3.1.5; before 3.2.0; 3.2.0-beta1, 3.2.0-beta2, 3.2.0-beta3, 3.2.0-beta4 — fixed in 3.1.5, 3.2.0
How to fix
Upgrade to a fixed version: discourse 3.1.5, 3.2.0. Check the vendor advisory for mitigations.
References
- https://github.com/discourse/discourse/commit/568d704a94c528b7c2cb0f3512a7b7b606bc3000
- https://github.com/discourse/discourse/security/advisories/GHSA-rj3g-8q6p-63pc
- https://meta.discourse.org/t/3-1-5-security-and-bug-fix-release/293094
- https://meta.discourse.org/t/3-2-0-beta5-add-groups-to-dms-mobile-chat-footer-redesign-passkeys-enabled-by-default-and-more/293093
- https://github.com/discourse/discourse/commit/568d704a94c528b7c2cb0f3512a7b7b606bc3000
- https://github.com/discourse/discourse/security/advisories/GHSA-rj3g-8q6p-63pc
- https://meta.discourse.org/t/3-1-5-security-and-bug-fix-release/293094
- https://meta.discourse.org/t/3-2-0-beta5-add-groups-to-dms-mobile-chat-footer-redesign-passkeys-enabled-by-default-and-more/293093
Get alerted when CVE-2024-23834 or the next vulnerability affects your stack