Platform
discourse
Component
discourse-ai
Fixed in
92.0.1
CVE-2024-54142 is a Cross-Site Scripting (XSS) vulnerability affecting the Discourse AI plugin for Discourse. This vulnerability allows malicious HTML entities within AI Bot conversations to be injected into Discourse posts when oneboxing. The vulnerability impacts versions of Discourse AI plugin prior to 92f122c. A fix has been released in version 92f122c, and users are advised to update immediately.
An attacker could leverage this XSS vulnerability to inject arbitrary JavaScript code into Discourse posts. This could lead to various malicious outcomes, including stealing user cookies, redirecting users to phishing sites, or defacing the website. The impact is particularly severe because the vulnerability arises from a seemingly innocuous feature – sharing AI Bot conversations. Successful exploitation could compromise user accounts and the integrity of the Discourse platform. The blast radius extends to all users who view posts containing oneboxed AI Bot conversations with malicious HTML entities.
This vulnerability was publicly disclosed on 2025-01-14. No public proof-of-concept (PoC) code has been released at the time of writing. The vulnerability's criticality (CVSS 9.1) indicates a high potential for exploitation if a PoC becomes available. It is not currently listed on CISA KEV.
Exploit Status
EPSS
0.26% (49% percentile)
CISA SSVC
CVSS Vector
The primary mitigation is to upgrade the Discourse AI plugin to version 92f122c or later, which contains the fix. If upgrading is not immediately feasible, a temporary workaround is to remove all groups from the 'ai bot public sharing allowed groups' site setting. This will prevent the sharing of AI Bot conversations, effectively disabling the vulnerable feature. Monitor Discourse logs for any unusual activity or suspicious JavaScript execution. After upgrading, confirm the fix by attempting to share a conversation containing HTML entities and verifying that the entities are properly sanitized and do not execute as JavaScript.
Update the Discourse AI plugin to the latest available version. If you are unable to update, remove all groups from the site setting `ai bot public sharing allowed groups`.
Vulnerability analysis and critical alerts directly to your inbox.
CVE-2024-54142 is a critical Cross-Site Scripting (XSS) vulnerability in the Discourse AI plugin, allowing malicious HTML entities in AI Bot conversations to be injected into Discourse posts.
You are affected if you are using the Discourse AI plugin in a version prior to 92f122c.
Upgrade the Discourse AI plugin to version 92f122c or remove all groups from the 'ai bot public sharing allowed groups' site setting.
There are currently no confirmed reports of active exploitation, but the high CVSS score suggests a potential for exploitation.
Refer to the official Discourse security announcement on their website for details and updates.
Upload your dependency file and we'll tell you instantly if this and other CVEs hit you.