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

Medium 6.3 Published Updated

Attackers can execute arbitrary scripts in Discourse forums if Content Security Policy is disabled, potentially compromising user accounts.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-23834?

CVE-2024-23834 is a medium-severity cross-site scripting vulnerability in Discourse Discourse, published on 30 Jan 2024. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-79

Which versions are affected by CVE-2024-23834?

1 open source package ship an affected version, including discourse. It affects 1 product.

PackageAffectedFixed in
discourse BitnamiAll versions3.2.0

Products include Discourse Discourse.

How do I fix CVE-2024-23834?

Upgrade discourse to 3.2.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-23834 being exploited?

There is no known exploitation of CVE-2024-23834 in the wild and no public exploit code.

All Discourse Discourse vulnerabilities

Sources

Also known as BIT-discourse-2024-23834, GHSA-rj3g-8q6p-63pc.

Is CVE-2024-23834 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free