DiscourseApplication

CVE-2023-29196

MEDIUM · 6.1 CVSS v3.1 Published 2023-04-18
Fix available
A fix is available. Upgrade to 3.0.3 / 3.1.0 or later.
See remediation →
68/100
Remediation priority · Elevated
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Discourse is an open source platform for community discussion. This vulnerability is not exploitable on the default install of Discourse. A custom feature must be enabled for it to work at all, and the attacker’s payload must pass the CSP to be executed. However, if an attacker succeeds in embedding Javascript that does pass the CSP, it could result in session hijacking for any users that view the attacker’s post. The vulnerability is patched in the latest tests-passed, beta and stable branches. Users are advised to upgrade. Users unable to upgrade should enable and/or restore your site's CSP to the default one provided with Discourse. Remove any embed-able hosts configured.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Discourse contains a stored cross-site scripting (XSS) vulnerability that allows attackers to embed malicious JavaScript in posts. The vulnerability is only exploitable when a custom feature is enabled and the attacker's payload successfully bypasses the Content Security Policy (CSP). Successful exploitation can lead to session hijacking for any user viewing the affected post.

MitigationUpgrade Discourse to the latest tests-passed, beta, or stable branch. If unable to upgrade, restore the default CSP and remove any configured embed-able hosts.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
DiscourseApplication
Affected:< 3.0.3< 3.1.0= 3.1.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check the installed Discourse version
    Access the Discourse admin panel and navigate to /about or use the Discourse API to retrieve the version number. Alternatively, check the version file in the Discourse installation directory if you have server access.
    Affected if The version is less than 3.0.3, or is 3.1.0, or is any version below 3.1.1 (e.g., 3.0.0, 3.0.2, 3.1.0, 3.0.1).
  2. Verify if the embedding feature is enabled
    In the Discourse admin panel, navigate to the Embedding settings (usually under Settings > Embedding). Check if 'allow embed' or a similar option is enabled, and verify if any hosts are configured in 'embeddable hosts'.
    Affected if Embedding is enabled and one or more hosts are listed in the embeddable hosts configuration.
  3. Inspect the Content Security Policy configuration
    In the Discourse admin panel, navigate to the Security settings and review the Content Security Policy (CSP) headers. Check if the default CSP has been modified or if exceptions have been added for embedded content.
    Affected if The default CSP has been modified, relaxed, or contains exceptions that allow scripts from external embeddable hosts.

You are affected if your Discourse version is below 3.1.1 AND the embedding feature with custom embeddable hosts is enabled AND your CSP has been customized to allow the attacker's payload to execute.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 3.0.3 / 3.1.0 or later
Fixed in 3.0.33.1.0
Interim mitigation

Upgrade Discourse to the latest tests-passed, beta, or stable branch. If unable to upgrade, restore the default CSP and remove any configured embed-able hosts.

Recommended fix Moderate confidence

Latest stable/beta/tests-passed branch (version > 3.1.0)

  1. 1. Back up your Discourse installation and database before proceeding with any upgrade.
  2. 2. Upgrade Discourse to the latest stable/beta/tests-passed branch (version greater than 3.1.0) which contains the security patch.
  3. 3. After upgrading, verify the patch is applied by reviewing the Discourse security release notes for 3.1.1 or later.
  4. 4. If unable to upgrade immediately: navigate to your Discourse admin panel and ensure CSP (Content Security Policy) is enabled and set to the default Discourse configuration.
  5. 5. In admin settings, review and remove any 'embeddable hosts' that are not explicitly required for your community functionality.

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Discourse Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing2.0 h
6.0 hours of engineering $1,060
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,696.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-29196 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-29196 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data